﻿Imports System.Data.OracleClient

Public Class Form1
    'Function Declarations

    'Private Function Delcarations

    'Developer Name: Jason Lyle
    'Module Name: Mouse Control
    'Task(s): N/A
    'Pre-Condition: The clickstream exists
    'Post-Condition: The clickstream has nIputs more inputs, represented by
    '		the array pInputs, where pInputs is of size cbSize
    'Functionality: The inputs stored in pInputs are placed into the clickstream
    Private Declare Function SendInput Lib "user32.dll" ( _
     ByVal nInputs As Integer, ByRef pInputs As INPUT_TYPE, _
     ByVal cbSize As Integer) As Integer


    'Public Function Declarations



    'Structure Declarations

    'Private Structures

    'Developer Name: Jason Lyle
    'Module Name: Mouse control
    'Task(s):  N/A
    'Functionality: A structure used to represent system input
    Private Structure INPUT_TYPE
        	
				'The type of input
		    Public dwType As Integer
		    
		    'The information about the mouse input
		    Public xi As MOUSEINPUT
    End Structure

    'Developer Name: Jason Lyle
    'Module Name: Mouse control
    'Task(s): N/A
    'Functionality: A structure used to represent mouse events
    Private Structure MOUSEINPUT
       				
				'Change in the cursors x position
		    Public dx As Integer
		    
		    'Change in the cursors y position
		    Public dy As Integer
		    
		    'Not used, just set to 0
		    Public mouseData As Integer
		    
		    'What kind of action is occurring
		    Public dwFlags As Integer
		    
		    'Not used, just set to 0
		    Public dwtime As Integer
		    
		    'Not used, just set to 0
		    Public dwExtraInfo As Integer
    End Structure

    'Public Structures



    'Property Declarations



    'Global Objects

    'Private

    'A way to prompt the user for information without losing mouse functionality and 
    'using the custom textbox
    Private WithEvents prompt As inputPrompt.inputPrompt

    'Public



    'Global Variables

    'Constant

    'Input types for the INPUT_TYPE structure
    'Module: Mouse control
    Private Const INPUT_MOUSE = 0
    Private Const INPUT_KEYBOARD = 1
    Private Const INPUT_HARDWARE = 2

    'Key sates for ProcessCmdKey and ProcessKeyPreview
    'Module: Mouse control
    Private Const WM_KEYDOWN As Integer = 256
    Private Const WM_SYSKEYDOWN As Integer = 260
    Private Const WM_KEYUP As Integer = 257
    Private Const WM_SYSKEYUP As Integer = 261

    'numerical representations of mouse events used by the INPUT_TYPE strructure
    'Module: Mouse Control
    Private Const MOUSE_MOVE = &H1
    Private Const MOUSE_LEFTDOWN = &H2
    Private Const MOUSE_LEFTUP = &H4


    'Non-constant

    'An array to hold all the atheteProfileIds of athletes to compare
    Dim athleteCompare() As String = New String() {-1}

    'An array to hold all the teamProfileIds of teams to compare
    Dim teamCompare() As String = New String() {-1}

    'The profileManagerId of the profile manager that is currently being edited
    Dim currentProfileManagerId As String = -1

    'The athleteProfileId of the athlete that is currently selected
    Dim currentAthleteProfileId As String = -1

    'The teamProfileId of the team that is currently selected
    Dim currentTeamProfileId As String = -1



    'Function Definitions

    'Event Handlers

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager
    'Task(s): N/A
    'Pre-Condition: The program has not been loaded before.
    'Post-Condition: The program is loaded and all data has been added to the
    '		program
    'Functionality: This function is called anytime the program is loaded.  It
    '		calls another function to load all the base data into the project.
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Load the base data for demo-purposes
        load_base_data()
    End Sub

    'Developer Name: Jason Lyle 
    'Module Name: Profile Manager Management
    'Task(s): 1.1 create new profile manager
    'Pre-Condition: A custom prompt entity exists.
    'Post-Condition: Returns the input of the user.
    'Functionality: Prompt the user for information
    Private Sub promptResponse(ByVal input As String, ByVal flag As String) Handles prompt.okayClicked

				'If the prompt was used for adding a profile manager, then call
				'		the addProfileManager function
        If flag = "add" Then
            If input <> "" Then
                addProfileManager(input)
            End If
        'If the prompt was used for copying a profile manager, then call
				'		the copyProfileManager function
        ElseIf flag = "copy" Then
            If input <> "" Then
                copyProfileManager(input)
            End If
        'If the prompt was used for renaming a profile manager, then call
				'		the renameProfileManager function
        ElseIf flag = "rename" Then
            If input <> "" Then
                renameProfileManager(input)
            End If
        End If

    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1. Manage Profile Managers, 1.1 Create New Profile Manager,
    '		1.1.1 Specify Profile Manager Name
    'Pre-Condition: None
    'Post-Condition: A new profile manager has been added.
    'Functionality: Create a new profile manager.
    Private Sub profileManagerAddProfileManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles profileManagerAddProfileManager.Click
        
        'Prompt the user for the name for the new profile manager
        prompt = New inputPrompt.inputPrompt("Please enter the name of the new profile Manager.", "New Profile Manager", "add")
        prompt.Show()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1. Manage Profile Managers, 1.6 Copy Existing Profile Manager, 1.6.1 Specify Profile Manager Name
    'Pre-Condition: There is a profile manager that exists which to copy.
    'Post-Condition: A copy of the selected profile manager is made
    'Functionality: Copy an existing profile manager
    Private Sub profileManagerCopyProfileManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles profileManagerCopyProfileManager.Click
        
        'Prompt the user for the name for the copied profile manager
        prompt = New inputPrompt.inputPrompt("Please enter the name of the new profile Manager.", "Copy Profile Manager", "copy")
        prompt.Show()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1. Manage Profile Manager, 1.2 Access Existing Profile Manager
    'Pre-Condition: A profile manager is selected
    'Post-Condition: The selected profile manager becomes the active
    '		profile manager
    'Functionality: Make the selected profile manager active.
    Private Sub profileManagerOpenProfileManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles profileManagerOpenProfileManager.Click
        
        'Set the current profile manager ID and reset the athlete and team
        '		compare lists to empty
        currentProfileManagerId = profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, profileManagerProfileManagerGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value
        athleteCompare = New String() {-1}
        teamCompare = New String() {-1}

        'Inform the user that the profile manager opened
        MsgBox("Profile Manager opened successfully.", MsgBoxStyle.ApplicationModal, "Profile Manager")
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): N/A
    'Pre-Condition: A profile manager is selected
    'Post-Condition: The selected profile manager is renamed.
    'Functionality: Rename the selected profile manager.
    Private Sub profileManagerRenameProfileManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles profileManagerRenameProfileManager.Click
        
        'Prompt the user for the new name of the profile manager
        prompt = New inputPrompt.inputPrompt("Please enter the new name of the profile Manager.", "Rename Profile Manager", "rename")
        prompt.Show()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1. Manage Profile Managers, 1.4 Import Profile Manager
    'Pre-Condition: None
    'Post-Condition: The selected profile manager is imported.
    'Functionality: Import a profile manager from a file.
    Private Sub profileManagerImportProfileManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles profileManagerImportProfileManager.Click
        'To be implemented at a later date
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1. Manage Profile Managers, 1.5 Export Profile Manager, 1.5.1 Export, Normal, 1.5.2 Export, Access
    'Pre-Condition: A profile manager is selected
    'Post-Condition: The selected profile manager is exported to a file.
    'Functionality: Export the selected profile manager.
    Private Sub profileManagerExportProfileManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles profileManagerExportProfileManager.Click
        'To be implemented at a later date
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1. Manage Profile Managers
    'Pre-Condition: A profile manager exists and is selected
    'Post-Condition: That selected profile manager no longer exists
    'Functionality: Delete a profile manager and all entities referencing it.
    Private Sub profileManagerDeleteProfileManager_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles profileManagerDeleteProfileManager.Click
        
        'The id of the profile manager to delete
        Dim profileManagerIdToDelete As String
        
        'The number of athletes in the system
        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count
        
        'The number of teams in the system
        Dim numTeams As Integer = teamTeamGrid.Rows.Count
        
        'Warn the user that the operation is permenant, then get their response
        Dim response As Integer = MsgBox("This is a permenant operation.  Once it is done, you cannot undo it.  " _
                   & "All athletes and teams associated with this profile manager will be deleted.  " _
                   & "Are you sure you want to delete this profile manager?", _
                   MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation + MsgBoxStyle.DefaultButton2, "Delete Profile Manager")

        'If the user says yes to the prompt
        If response = 6 Then
        	
        		'Set the profile manager id to delete and delete it
            profileManagerIdToDelete = profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, profileManagerProfileManagerGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value
            profileManagerProfileManagerGrid.Rows.RemoveAt(profileManagerProfileManagerGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected))

						'Loop through all the ahtletes, and if they are a part of the
						'		deleted profile manager, then delete them
            For index As Integer = 0 To numAthletes - 1
                
                If index < athleteAthleteGrid.Rows.Count Then
                
                    If athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = profileManagerIdToDelete Then
                        athleteAthleteGrid.Rows.RemoveAt(index)
                        numAthletes = numAthletes - 1
                        index = index - 1
                    End If
                    
                End If
                
            Next
						
						'Loop through all the teams, and if they are a part of the
						'		deleted profile manager, then delete them
            For index As Integer = 0 To numTeams - 1
                
                If index < teamTeamGrid.Rows.Count Then
                
                    If teamTeamGrid.Item(teamProfileManagerIdCol.Index, index).Value = profileManagerIdToDelete Then
                        teamTeamGrid.Rows.RemoveAt(index)
                        numTeams = numTeams - 1
                        index = index - 1
                    End If
                    
                End If
                
            Next

        End If
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: Some other tab was active.
    'Post-Condition: The Athete Profile tab is now active and updated for the
    '		circumstances the user has created.
    'Functionality: Updated the Athlete profile tab for the circumstances
    '		provided by the user when the user navigates to this tab.
    Private Sub focusAthleteTab() Handles athleteProfileTab.Enter
        
        'Set up the athlete tab
        prepareAthlete()
    End Sub

    'Developer Name: Jason Lyle and Stephen Durfey
    'Module Name: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: The athlete grid exists and is populated with at least one selectable row.
    'Post-Condition: The athlete profile tab is appropriately updated.
    'Functionality: Update the athlete profile tab appropriately when the selection of
    '       the athlete changes.
    Private Sub athleteAthleteGrid_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteAthleteGrid.SelectionChanged
        
        'Set the current athlete profile id
        currentAthleteProfileId = athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value
        
        'Update the add to compare button
        updateAthleteAddToCompareBtnStatus()

        'hides text boxes
        athleteTab_hideTextBoxes()
        
        'Load the appropriate data into the athlete text labels
        populateAthleteTextLabels()

        'sets the color for the athlete text labels
        changeAthleteTextLabelColor(athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value)


    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Athlete Profile Management
    'Task(s): 3.6 Add Athlete to Comparison
    'Pre-Condition: An athlete is selected.
    'Post-Condition: The selected athlete is added to the comparison list.
    'Functionality: Add the selected athlete to the comparison list.
    Private Sub athleteAddToCompareBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_AddToCompareBtn.Click

        'If the user has opened a profile manager, add the selected athlete
        '		to the compare list
        If currentProfileManagerId <> -1 Then
            ReDim Preserve athleteCompare(athleteCompare.Count)

            athleteCompare(athleteCompare.Count - 1) = currentAthleteProfileId
            MsgBox("Athlete added to the compare list.", MsgBoxStyle.DefaultButton1, "Compare")

            athleteTab_AddToCompareBtn.Enabled = False
            'Otherwise, alert the user that they need to open a profile manager
            '		before they can carry out this operation
        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before adding an athlete to the comparison list.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Athlete Profile Management
    'Task(s): 3.5 Print Athlete Profile
    'Pre-Condition: There is an existing athlete profile to print.
    'Post-Condition: The athlete profile has been printed.
    'Functionality: Print the current athlete profile.
    Private Sub athletePrintProfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athletePrintProfile.Click
        'To be implemented at a later date
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: The athlete add to compare button has been loaded.
    'Post-Condition: The save profile button is enabled or disabled appropriately
    'Functionality: Enable/Disable the save profile button appropriately
    Private Sub ahleteAddToCompareBtn_VisibilityChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles athleteTab_AddToCompareBtn.VisibleChanged

        'If the add to comparison button is visible, disable the save profile button
        'and if the add to comparison button is invisible, enable the save profile button.
        athleteTab_saveProfileButton.Enabled = Not athleteTab_AddToCompareBtn.Visible

    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: The athlete save profile button has been loaded
    'Post-Condition: The add to compare button is enabled or disabled appropriately
    'Functionality: Enable/Disable the add to compare button appropriately
    Private Sub athletetabSaveProfileButton_VisibilityChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles athleteTab_saveProfileButton.VisibleChanged

        'If the save profile button is visible, disable the add to comparison button
        'and if the save to profile button is invisible, enable the add to profile button.
        athleteTab_AddToCompareBtn.Enabled = Not athleteTab_saveProfileButton.Visible
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete first name text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete first name text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorFirstNameTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_firstNameTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete last name text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete last name text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorLastNameTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_lastNameTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete middle initial text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete middle initial text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorMiddleInitialTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_middleInitialTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete nick name text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete nick name text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorNickNameTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_nickNameTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete class rank text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete class rank text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorClassRankTextColor(ByRef sender As System.Object, ByVal newColor As Color)
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete team name text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete team name text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorTeamTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_teamTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete number text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete number text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorNumberTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_numberTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete points per game text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete points per game text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorPPGTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_ppgTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete steals per game text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete steals per game text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorSPGTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_spgTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete minutes per game text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete minutes per game text box. Initiates a color change
    '               for all text boxes currently visible

    Private Sub changeAthleteColorMPGTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_mpgTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete assists per game text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete assists per game text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorAPGTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_apgTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete rebounds per game text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete rebounds per game text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorRPGTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_rpgTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete free throw percentage text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete free throw percentage text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorFTPTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_ftpTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in athlete notes text box has been changed
    'Post-Condition: changeAthleteTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to athlete notes text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeAthleteColorNotesTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles athleteTab_notesTextBox.colorChanged
        changeAthleteTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): 3.1 Add Athlete Profile
    '          3.1.1 Add Athlete Name
    '           3.1.1.1 Add Athlete First Name
    '           3.1.1.2 Add Athlete Last Name
    '           3.1.1.3 Add Athlete Middle Initial
    '           3.1.1.4 Add Athlete Nickname
    '          3.1.2 Add Athlete Notes
    '          3.1.3 Add Athlete Number
    '          3.1.4 Add Athlete Picture(s)
    '           3.1.4.1 Select Athlete Picture(s) to Add
    '          3.1.5 Add Athlete Statistics
    '           3.1.5.1 Add Athlete Points per Game
    '           3.1.5.2 Add Athlete Assists per Game
    '           3.1.5.3 Add Athlete Rebounds per Game
    '           3.1.5.4 Add Athlete Minutes per Game
    '           3.1.5.5 Add Athlete Steals per Game
    '           3.1.5.6 Add Athlete Free Throw Percentage
    '          3.1.6 Add Athlete Class Rank
    '          3.1.7 Date Added to System
    'Pre-Condition: Add athlete button has been clicked
    'Post-Condition: Unhides and clears all athlete text boxes for user input. default color is black
    'Functionality: Prepares form for addition of a new profile to the data grid
    Private Sub addProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addProfileButton.Click

        currentAthleteProfileId = -2

        If currentProfileManagerId <> -1 Then

            'unhides text boxes in preparation of user input
            athleteTab_UnhideTextBoxes()

            editImageButton.Visible = True
            athleteTab_saveProfileButton.Visible = True
            athleteTab_athletePic.Image = athleteProfileScreen.My.Resources.noImage

            athleteTab_hideSearchTextBoxes()

            athleteTab_firstNameTextBox.displayText = ""
            athleteTab_lastNameTextBox.displayText = ""
            athleteTab_nickNameTextBox.displayText = ""
            athleteTab_classRankTextBox.Text = ""
            athleteTab_teamTextBox.displayText = ""
            athleteTab_numberTextBox.displayText = ""
            athleteTab_ppgTextBox.displayText = ""
            athleteTab_apgTextBox.displayText = ""
            athleteTab_rpgTextBox.displayText = ""
            athleteTab_mpgTextBox.displayText = ""
            athleteTab_spgTextBox.displayText = ""
            athleteTab_ftpTextBox.displayText = ""
            athleteTab_notesTextBox.displayText = ""
            athleteTab_middleInitialTextBox.displayText = ""

            athleteTab_AddToCompareBtn.Visible = False
            changeAthleteTextColorTextBox(Color.Black)

            'Ensure that one of the textboxes does not get the focus
            athleteTab_firstNameLabel.Focus()
        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before adding an athlete.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s):3.1 Add Athlete Profile
    '         3.1.1 Add Athlete Name
    '          3.1.1.1 Add Athlete First Name
    '          3.1.1.2 Add Athlete Last Name
    '          3.1.1.3 Add Athlete Middle Initial
    '          3.1.1.4 Add Athlete Nickname
    '        3.1.2 Add Athlete Notes
    '        3.1.3 Add Athlete Number
    '        3.1.4 Add Athlete Picture(s)
    '         3.1.4.1 Select Athlete Picture(s) to Add
    '        3.1.5 Add Athlete Statistics
    '         3.1.5.1 Add Athlete Points per Game
    '         3.1.5.2 Add Athlete Assists per Game
    '         3.1.5.3 Add Athlete Rebounds per Game
    '         3.1.5.4 Add Athlete Minutes per Game
    '         3.1.5.5 Add Athlete Steals per Game
    '         3.1.5.6 Add Athlete Free Throw Percentage
    '       3.1.6 Add Athlete Class Rank
    '       3.1.7 Date Added to System
    '      3.2 Edit Athlete Profile
    '       3.2.1 Edit Athlete Name
    '        3.2.1.1 Edit Athlete First Name
    '        3.2.1.2 Edit Athlete Last Name
    '        3.2.1.3 Edit Athlete Middle Initial
    '        3.2.1.4 Edit Athlete Nickname
    '        3.2.2 Edit Athlete Notes
    '        3.2.3 Edit Athlete Number
    '        3.2.4 Edit Athlete Picture(s)
    '       3.2.4.1 Select Athlete Picture(s) to Edit
    '      3.2.5 Edit Athlete Statistics
    '       3.2.5.1 Edit Athlete Points per Game
    '       3.2.5.2 Edit Athlete Assists per Game
    '       3.2.5.3 Edit Athlete Rebounds per Game
    '       3.2.5.4 Edit Athlete Minutes per Game
    '       3.2.5.5 Edit Athlete Steals per Game
    '       3.2.5.6 Edit Athlete Free Throw Percentage
    '      3.2.6 Edit Athlete Class Rank
    'Pre-Condition: Save Profile button is visible has been clicked
    'Post-Condition: Saves the new values for a profile into the datagrid. If it is a new profile
    '                a new row is created in the athlete data grid, and its fields are populated. If
    '                it is an existing athlete profile, the new values are inserted into the data grid
    '                based on the athleteProfileId number
    'Functionality: Saves data entered in athlete text boxes into the athlete data grid into the appropriate
    '               fields by the correct athleteProfileId number
    Private Sub athleteTab_saveProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_saveProfileButton.Click

        If currentAthleteProfileId <> -2 Then
            'grabs selected row and populates the saves the values into the datagrid
            Dim indexSelected As Integer = athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

            athleteAthleteGrid.Item(athleteFirstNameCol.Index, indexSelected).Value() = athleteTab_firstNameTextBox.displayText
            athleteAthleteGrid.Item(athleteLastNameCol.Index, indexSelected).Value() = athleteTab_lastNameTextBox.displayText
            athleteAthleteGrid.Item(athleteNicknameCol.Index, indexSelected).Value() = athleteTab_nickNameTextBox.displayText
            athleteAthleteGrid.Item(athleteClassRankCol.Index, indexSelected).Value() = athleteTab_classRankTextBox.Text
            athleteAthleteGrid.Item(athleteTeamNameCol.Index, indexSelected).Value() = athleteTab_teamTextBox.displayText
            athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, indexSelected).Value() = athleteTab_numberTextBox.displayText
            athleteAthleteGrid.Item(athletePtsPerGameCol.Index, indexSelected).Value() = athleteTab_ppgTextBox.displayText
            athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, indexSelected).Value() = athleteTab_apgTextBox.displayText
            athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, indexSelected).Value() = athleteTab_rpgTextBox.displayText
            athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, indexSelected).Value() = athleteTab_mpgTextBox.displayText
            athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, indexSelected).Value() = athleteTab_spgTextBox.displayText
            athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, indexSelected).Value() = athleteTab_ftpTextBox.displayText
            athleteAthleteGrid.Item(athleteMiddleInitialCol.Index, indexSelected).Value() = athleteTab_middleInitialTextBox.displayText
            athleteAthleteGrid.Item(athletePictureCol.Index, indexSelected).Value() = athleteTab_athletePic.Image
            athleteAthleteGrid.Item(athleteTextColorCol.Index, indexSelected).Value = athleteTab_firstNameTextBox.textColor
            populateAthleteTextLabels()

        Else
            Dim athleteNum As Integer = athleteAthleteGrid.Rows.Count
            Dim highestId As Integer = athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, 0).Value()
            Dim currentId As Integer

            For index As Integer = 0 To athleteNum - 1
                currentId = athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value()

                If currentId > highestId Then
                    highestId = currentId
                End If
            Next

            athleteAthleteGrid.Rows.Add()
            athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = highestId + 1
            athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_firstNameTextBox.displayText
            athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_lastNameTextBox.displayText
            athleteAthleteGrid.Item(athleteNicknameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_nickNameTextBox.displayText
            athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_classRankTextBox.Text
            athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_teamTextBox.displayText
            athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_numberTextBox.displayText
            athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_ppgTextBox.displayText
            athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_apgTextBox.displayText
            athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_rpgTextBox.displayText
            athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_mpgTextBox.displayText
            athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_spgTextBox.displayText
            athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_ftpTextBox.displayText
            athleteAthleteGrid.Item(athleteMiddleInitialCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_middleInitialTextBox.displayText
            athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value() = athleteTab_athletePic.Image
            athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteTab_firstNameTextBox.textColor
            athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = currentProfileManagerId
            athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy H:mm:ss")

        End If
        changeAthleteTextLabelColor(athleteTab_firstNameTextBox.textColor)

        'hides text boxes
        athleteTab_hideTextBoxes()
        populateAthleteTextLabels()
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Athlete First Name Radio is visible and has been checked
    'Post-Condition: All athlete search radio buttons are hidden, except for the First Name
    '                Radio button. Search first name text box is now visible, and all athlete
    '                text labels are visible
    'Functionality: Prepares athlete form for searching athlete data grid by first name
    Private Sub athleteTab_searchFirstNameRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchFirstNameRadio.CheckedChanged

        athleteTab_hideSearchTextBoxes()
        athleteTab_searchFirstNameTextBox.Visible = True
        athleteTab_searchFirstNameRadio.Visible = True
        athleteTab_searchFirstNameTextBox.Clear()
        athleteTab_searchFirstNameTextBox.Focus()

        athleteTab_searchDisplayHeading.Text = "Searching By First Name"
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Athlete Team Name Radio is visible and has been checked
    'Post-Condition: All athlete search radio buttons are hidden, except for the team Name
    '                Radio button. Search first name text box is now visible, and all athlete
    '                text labels are visible
    'Functionality: Prepares athlete form for searching athlete data grid by team name
    Private Sub searchTeam_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchTeamRadio.CheckedChanged

        athleteTab_hideSearchTextBoxes()
        athleteTab_searchTeamRadio.Visible = True
        athleteTab_searchTeamNameTextBox.Visible = True
        athleteTab_searchTeamNameTextBox.Focus()
        athleteTab_searchDisplayHeading.Text = "Search By Team Name"
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Athlete Nick Name Radio is visible and has been checked
    'Post-Condition: All athlete search radio buttons are hidden, except for the Nick Name
    '                Radio button. Search nick name text box is now visible, and all athlete
    '                text labels are visible
    'Functionality: Prepares athlete form for searching athlete data grid by nick name
    Private Sub athleteTab_searchNicknameRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchNicknameRadio.CheckedChanged

        athleteTab_hideSearchTextBoxes()
        athleteTab_searchNicknameTextBox.Visible = True
        athleteTab_searchNicknameRadio.Visible = True
        athleteTab_searchNicknameTextBox.Clear()
        athleteTab_searchNicknameTextBox.Focus()

        athleteTab_searchDisplayHeading.Text = "Searching By Nickname"
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Athlete Class Rank Radio is visible and has been checked
    'Post-Condition: All athlete search radio buttons are hidden, except for the Class Rank
    '                Radio button. Search class rank text box is now visible, and all athlete
    '                text labels are visible
    'Functionality: Prepares athlete form for searching athlete data grid by class rank
    Private Sub athleteTab_searchClassRankRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchClassRankRadio.CheckedChanged

        athleteTab_hideSearchTextBoxes()
        athleteTab_searchClassRankRadio.Visible = True
        athleteTab_searchClassRankTextBox.Visible = True
        athleteTab_searchClassRankTextBox.Focus()

        athleteTab_searchDisplayHeading.Text = "Searching By Class Rank"
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Athlete Date Added Radio is visible and has been checked
    'Post-Condition: All athlete search radio buttons are hidden, except for the Date Added
    '                Radio button. all athlete text labels are visible
    'Functionality: Prepares athlete form for searching athlete data grid by date added
    Private Sub dateAdded_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchDateAddedRadio.CheckedChanged

        'Sort by the date added column in ascending order
        athleteAthleteGrid.Sort(athleteDateCreatedCol, System.ComponentModel.ListSortDirection.Ascending)

        athleteTab_hideSearchTextBoxes()
        athleteTab_searchDateAddedRadio.Visible = True

        athleteTab_searchDisplayHeading.Text = "Searching By Date Added"
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Athlete Last Name Radio is visible and has been checked
    'Post-Condition: All athlete search radio buttons are hidden, except for the Last Name
    '                Radio button. Search first name text box is now visible, and all athlete
    '                text labels are visible
    'Functionality: Prepares athlete form for searching athlete data grid by last name
    Private Sub lastName_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchLastNameRadio.CheckedChanged

        athleteTab_hideSearchTextBoxes()
        athleteTab_searchLastNameTextBox.Visible = True
        athleteTab_searchLastNameRadio.Visible = True
        athleteTab_searchLastNameTextBox.Clear()
        athleteTab_searchLastNameTextBox.Focus()

        athleteTab_searchDisplayHeading.Text = "Search By Last Name"
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Management
    'Tasks: 
    'Pre-Condition : Browse Profile Button is visible, and has been clicked
    'Post-Condition: Unchecks all radio buttons that are search options, all radio
    '                buttons are visible, all athlete text boxes are hidden, all
    '                athlete text labels are populated with the appropriate data
    '                from the athlete data grid, unhides the 'addToAthleteCompareBtn'
    '                so athletes can be added to the compare list
    'Functionality : Prepares the form for searching athletes within datagrid

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_browseProfileButton.Click
        Dim indexSelected As Integer = athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

        If currentProfileManagerId <> -1 Then

            'unchecks all radio boxes
            athleteTab_searchClassRankRadio.Checked = False
            athleteTab_searchDateAddedRadio.Checked = False
            athleteTab_searchFirstNameRadio.Checked = False
            athleteTab_searchLastNameRadio.Checked = False
            athleteTab_searchNicknameRadio.Checked = False
            athleteTab_searchTeamRadio.Checked = False

            'unhides radio search options
            athleteTab_searchClassRankRadio.Visible = True
            athleteTab_searchNicknameRadio.Visible = True
            athleteTab_searchDateAddedRadio.Visible = True
            athleteTab_searchLastNameRadio.Visible = True
            athleteTab_searchTeamRadio.Visible = True
            athleteTab_searchFirstNameRadio.Visible = True

            'hides textboxes
            athleteTab_hideTextBoxes()


            'populates all the text labels with the current athlete information
            populateAthleteTextLabels() 'definition on line 290
            changeAthleteTextLabelColor((athleteAthleteGrid.Item(athleteTextColorCol.Index, indexSelected).Value)) 'definition on line 2747

            'repopulates the datagrid, needed after a search has already been conducted
            'prepareAthlete()
            athleteTab_AddToCompareBtn.Visible = True
        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before browsing athletes.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Manager
    'Task(s): 3.2 Edit Athlete Profile
    '         3.2.1 Edit Athlete Name
    '         3.2.1.1 Edit Athlete First Name					
    '         3.2.1.2 Edit Athlete Last Name
    '         3.2.1.3 Edit Athlete Middle Initial
    '         3.2.1.4 Edit Athlete Nickname
    '         3.2.2 Edit Athlete Notes
    '         3.2.3 Edit Athlete Number
    '         3.2.4 Edit Athlete Picture(s)
    '           3.2.4.1 Select Athlete Picture(s) to Edit
    '         3.2.5 Edit Athlete Statistics
    '         3.2.5.1 Edit Athlete Points per Game
    '         3.2.5.2 Edit Athlete Assists per Game
    '         3.2.5.3 Edit Athlete Rebounds per Game
    '         3.2.5.4 Edit Athlete Minutes per Game
    '         3.2.5.5 Edit Athlete Steals per Game
    '         3.2.5.6 Edit Athlete Free Throw Percentage
    '         3.2.6 Edit Athlete Class Rank
    'Pre-Condition: Edit Button is visible and has been clicked
    'Post-Condition: All athlete text boxes are now visible, and ready for user input. Values from
    '                athlete data grid have been inserted into athlete text boxes. Save profile button
    '                is now visible.
    'Functionality:  Prepares athlete form for editing the selected athlete profile from the athlete data grid
    Private Sub editProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_editProfileButton.Click
        Dim indexSelected As Integer = athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

        If currentProfileManagerId <> -1 Then

            'unhides text boxes for user input
            athleteTab_UnhideTextBoxes()

            editImageButton.Visible = True
            athleteTab_saveProfileButton.Visible = True

            'hides search text boxes
            athleteTab_hideSearchTextBoxes()

            'populates TextBoxes from datagrid
            athleteTab_firstNameTextBox.displayText = athleteAthleteGrid.Item(athleteFirstNameCol.Index, indexSelected).Value
            athleteTab_lastNameTextBox.displayText = athleteAthleteGrid.Item(athleteLastNameCol.Index, indexSelected).Value
            athleteTab_nickNameTextBox.displayText = athleteAthleteGrid.Item(athleteNicknameCol.Index, indexSelected).Value
            athleteTab_classRankTextBox.Text = athleteAthleteGrid.Item(athleteClassRankCol.Index, indexSelected).Value
            athleteTab_teamTextBox.displayText = athleteAthleteGrid.Item(athleteTeamNameCol.Index, indexSelected).Value
            athleteTab_numberTextBox.displayText = athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, indexSelected).Value
            athleteTab_ppgTextBox.displayText = athleteAthleteGrid.Item(athletePtsPerGameCol.Index, indexSelected).Value
            athleteTab_apgTextBox.displayText = athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, indexSelected).Value
            athleteTab_rpgTextBox.displayText = athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, indexSelected).Value
            athleteTab_mpgTextBox.displayText = athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, indexSelected).Value
            athleteTab_spgTextBox.displayText = athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, indexSelected).Value
            athleteTab_ftpTextBox.displayText = athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, indexSelected).Value
            athleteTab_middleInitialTextBox.displayText = athleteAthleteGrid.Item(athleteMiddleInitialCol.Index, indexSelected).Value
            athleteTab_notesTextBox.displayText = athleteAthleteGrid.Item(athleteNotesCol.Index, indexSelected).Value
            athleteTab_athletePic.Image = athleteAthleteGrid.Item(athletePictureCol.Index, indexSelected).Value

            changeAthleteTextColorTextBox((athleteAthleteGrid.Item(athleteTextColorCol.Index, indexSelected).Value))
            'athleteAthleteGrid.Refresh()
            athleteTab_AddToCompareBtn.Visible = False

            'Ensure the focus does not go to any textboxes
            athleteTab_firstNameLabel.Focus()
        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before editing an athlete.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Athlete Profile Manager
    'Task(s): 3.4.1 Search by Last Name
    'Pre-Condition: Radio button for searching by last name has been checked
    'Post-Condition: The athlete data grid only shows the rows matching the user input
    'Functionality: Allows the user to search athlete data grid by athlete's last name
    Private Sub athleteTab_searchLastNameTextBox_Load(ByRef sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchLastNameTextBox.textChanged
        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        For index As Integer = 0 To numAthletes - 1
            Dim lowerString As String = athleteAthleteGrid.Item(athleteLastNameCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & athleteTab_searchLastNameTextBox.displayText.Trim & "*" And athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                athleteAthleteGrid.Rows(index).Visible = True
            Else
                athleteAthleteGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Athlete Profile Manager
    'Task(s): 3.4.2 Search by First Name
    'Pre-Condition: Radio button for searching by first name has been checked
    'Post-Condition: The athlete data grid only shows the rows matching the user input
    'Functionality: Allows the user to search athlete data grid by athlete's first name
    Private Sub athleteTab_searchFirstNameTextBox_Load(ByRef sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchFirstNameTextBox.textChanged

        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        For index As Integer = 0 To numAthletes - 1
            Dim lowerString As String = athleteAthleteGrid.Item(athleteFirstNameCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & athleteTab_searchFirstNameTextBox.displayText.Trim & "*" And athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                athleteAthleteGrid.Rows(index).Visible = True
            Else
                athleteAthleteGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Athlete Profile Manager
    'Task(s): 3.4.3 Search by Class Rank
    'Pre-Condition: Radio button for searching by class rank has been checked
    'Post-Condition: The athlete data grid only shows the rows matching the user input
    'Functionality: Allows the user to search athlete data grid by athlete's class rank
    Private Sub athleteTab_searchClassRankTextBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchClassRankTextBox.SelectedIndexChanged

        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        For index As Integer = 0 To numAthletes - 1
            Dim lowerString As String = athleteAthleteGrid.Item(athleteClassRankCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & athleteTab_searchClassRankTextBox.Text & "*" And athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                athleteAthleteGrid.Rows(index).Visible = True
            Else
                athleteAthleteGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Athlete Profile Manager
    'Task(s): 3.4.4 Search by Nick Name
    'Pre-Condition: Radio button for searching by nick name has been checked
    'Post-Condition: The athlete data grid only shows the rows matching the user input
    'Functionality: Allows the user to search athlete data grid by athlete's nick name
    Private Sub athleteTab_searchNickNameTextBox_Load(ByRef sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchNicknameTextBox.textChanged

        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        For index As Integer = 0 To numAthletes - 1
            Dim lowerString As String = athleteAthleteGrid.Item(athleteNicknameCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & athleteTab_searchNicknameTextBox.displayText.Trim & "*" And athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                athleteAthleteGrid.Rows(index).Visible = True
            Else
                athleteAthleteGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Athlete Profile Manager
    'Task(s): 3.4.5 Search by Team Name
    'Pre-Condition: Radio button for searching by team name has been checked
    'Post-Condition: The athlete data grid only shows the rows matching the user input
    'Functionality: Allows the user to search athlete data grid by athlete's team name
    Private Sub athleteTab_searchTeamNameTextBox_Load(ByRef sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_searchTeamNameTextBox.textChanged

        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        For index As Integer = 0 To numAthletes - 1
            Dim lowerString As String = athleteAthleteGrid.Item(athleteTeamNameCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & athleteTab_searchTeamNameTextBox.displayText.Trim & "*" And athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                athleteAthleteGrid.Rows(index).Visible = True
            Else
                athleteAthleteGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Athlete Profile Manager
    'Task(s): N/A
    'Pre-Condition: Athlete Data grid has been given focus
    'Post-Condition: Athlete data grid has focus, and all search text boxes have been hidden
    'Functionality: Hides search text boxes when data grid has focus
    Private Sub athleteTab_athleteDataGridFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteAthleteGrid.GotFocus
        athleteTab_hideSearchTextBoxes()
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s): 2.2 Edit Team Profile
    '          2.2.1 Edit Team Name
    '          2.2.2 Edit Team Notes
    '          2.2.3 Edit Team Cheer
    '          2.2.4 Edit Team Conference
    '          2.2.5 Edit Team Picture(s)
    '           2.2.5.1 Select Team Picture to Edit
    '          2.2.6 Edit Team Statistics
    '           2.2.6.1 Edit Team Wins
    '           2.2.6.2 Edit Team Losses
    '           2.2.6.3 Edit Team Win Percentage
    '           2.2.6.4 Edit Team Win/Loss Score Differential
    '           2.2.6.5 Edit Team Ranking
    '           2.2.6.5.1 Edit Team ESPN Poll Ranking
    '           2.2.6.5.2 Edit Team Records and Percentage Index (RPI)
    '          2.2.7 Edit School Name
    'Pre-Condition: Edit Button is visible and has been clicked
    'Post-Condition: All team text boxes are now visible, and ready for user input. Values from
    '                team data grid have been inserted into team text boxes. Save profile button
    '                is now visible.
    'Functionality:  Prepares team form for editing the selected team profile from the team data grid
    Private Sub teamTab_editProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_editProfileButton.Click
        If currentProfileManagerId <> -1 Then
            teamTab_unhideTextBoxes()

            'populates textboxes from datagrid values
            Dim indexSelected As Integer = teamTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)
            teamTab_conferenceTextBox.displayText = teamTeamGrid.Item(teamConferenceCol.Index, indexSelected).Value
            teamTab_ESPNRankingTextBox.displayText = teamTeamGrid.Item(teamESPNRankingCol.Index, indexSelected).Value
            teamTab_lossesTextBox.displayText = teamTeamGrid.Item(teamLossesCol.Index, indexSelected).Value
            teamTab_notesTextBox.displayText = teamTeamGrid.Item(teamNotesCol.Index, indexSelected).Value
            teamTab_RPITextBox.displayText = teamTeamGrid.Item(teamRPICol.Index, indexSelected).Value
            teamTab_schoolNameTextBox.displayText = teamTeamGrid.Item(teamSchoolNameCol.Index, indexSelected).Value
            teamTab_teamNameTextBox.displayText = teamTeamGrid.Item(teamTeamNameCol.Index, indexSelected).Value
            teamTab_winLossDiffTextBox.displayText = teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, indexSelected).Value
            teamTab_winsTextBox.displayText = teamTeamGrid.Item(teamWinsCol.Index, indexSelected).Value
            teamTab_cheerTextBox.displayText = teamTeamGrid.Item(teamCheerCol.Index, indexSelected).Value
            teamTab_pictureBox.Image = teamTeamGrid.Item(teamPictureCol.Index, indexSelected).Value

            changeTeamTextColorTextBox(teamTeamGrid.Item(teamTextColorCol.Index, indexSelected).Value)

            'Ensure none of the textboxes get the focus
            teamTab_teamName.Focus()
        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before editing a team.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in team text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to team name text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorTeamTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_teamNameTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in school name text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to school name text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorSchoolTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_schoolNameTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in conference text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to conference text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorConferenceTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_conferenceTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in wins text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to wins text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorWinsTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_winsTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in losses text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to losses text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorLossesTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_lossesTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in ESPN Rating text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to ESPN Rating text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorESPNTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_ESPNRankingTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in RPI Index text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to RPI Index text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorRPITextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_RPITextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in notes text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to notes text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorNotesTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_notesTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Color in cheer text box has been changed
    'Post-Condition: changeTeamTextColorTextBox has been called with the newColor sent to change
    '                text color in other text boxes
    'Functionality: Event handler attached to cheer text box. Initiates a color change
    '               for all text boxes currently visible
    Private Sub changeTeamColorCheerTextBox(ByRef sender As System.Object, ByVal newColor As Color) Handles teamTab_cheerTextBox.colorChanged
        changeTeamTextColorTextBox(newColor)
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s):2.1 Add Team Profile
    '         2.1.1 Add Team Name
    '         2.1.2 Add Team Notes
    '         2.1.3 Add Team Cheer
    '         2.1.4 Add Team Conference
    '         2.1.5 Add Team Picture(s)
    '          2.1.5.1 Select Picture(s) to Add
    '          2.1.6 Add Team Statistics
    '           2.1.6.1 Add Team Wins
    '           2.1.6.2 Add Team Losses
    '           2.1.6.3 Add Team Win Percentage
    '           2.1.6.4 Add Team Win/Loss Score Differential	
    '           2.1.6.5 Add Team Ranking
    '            2.1.6.5.1 Add Team ESPN Poll Ranking
    '            2.1.6.5.2 Add Team Records and Percentage Index (RPI)
    '         2.1.7 Add School Name
    '         2.1.8 Date Added to System
    '        2.2 Edit Team Profile
    '         2.2.1 Edit Team Name
    '         2.2.2 Edit Team Notes
    '         2.2.3 Edit Team Cheer
    '         2.2.4 Edit Team Conference
    '         2.2.5 Edit Team Picture(s)
    '          2.2.5.1 Select Team Picture to Edit
    '         2.2.6 Edit Team Statistics
    '          2.2.6.1 Edit Team Wins
    '          2.2.6.2 Edit Team Losses
    '          2.2.6.3 Edit Team Win Percentage
    '          2.2.6.4 Edit Team Win/Loss Score Differential
    '          2.2.6.5 Edit Team Ranking
    '           2.2.6.5.1 Edit Team ESPN Poll Ranking
    '           2.2.6.5.2 Edit Team Records and Percentage Index (RPI)
    '         2.2.7 Edit School Name
    'Pre-Condition: Save Profile button is visible and has been clicked
    'Post-Condition: If a team is being edited, the new values will be stored in the team data grid
    '                If a new team is being added, a new row is created for that team, and the data fields
    '                are populated with the user input
    'Functionality: Saves a new team profile into team datagrid, or edits an existing team profile
    Private Sub teamTab_saveProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_saveProfileButton.Click

        If currentTeamProfileId <> -2 Then
            Dim indexSelected As Integer = teamTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

            teamTeamGrid.Item(teamCheerCol.Index, indexSelected).Value = teamTab_cheerTextBox.displayText
            teamTeamGrid.Item(teamTeamNameCol.Index, indexSelected).Value = teamTab_teamNameTextBox.displayText
            teamTeamGrid.Item(teamConferenceCol.Index, indexSelected).Value = teamTab_conferenceTextBox.displayText
            teamTeamGrid.Item(teamESPNRankingCol.Index, indexSelected).Value = teamTab_ESPNRankingTextBox.displayText
            teamTeamGrid.Item(teamLossesCol.Index, indexSelected).Value = teamTab_lossesTextBox.displayText
            teamTeamGrid.Item(teamNotesCol.Index, indexSelected).Value = teamTab_notesTextBox.displayText
            teamTeamGrid.Item(teamRPICol.Index, indexSelected).Value = teamTab_RPITextBox.displayText
            teamTeamGrid.Item(teamSchoolNameCol.Index, indexSelected).Value = teamTab_schoolNameTextBox.displayText
            teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, indexSelected).Value = teamTab_winLossDiffTextBox.displayText
            teamTeamGrid.Item(teamWinsCol.Index, indexSelected).Value = teamTab_winsTextBox.displayText
            teamTeamGrid.Item(teamTextColorCol.Index, indexSelected).Value = teamTab_teamNameTextBox.textColor
        Else
            Dim teamNum As Integer = teamTeamGrid.Rows.Count
            Dim highestId As Integer = teamTeamGrid.Item(teamProfileManagerIdCol.Index, 0).Value()
            Dim currentId As Integer

            For index As Integer = 0 To teamNum - 1
                currentId = teamTeamGrid.Item(teamProfileManagerIdCol.Index, index).Value()

                If currentId > highestId Then
                    highestId = currentId
                End If
            Next

            teamTeamGrid.Rows.Add()
            teamTeamGrid.Item(teamCheerCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_cheerTextBox.displayText
            teamTeamGrid.Item(teamTeamNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_teamNameTextBox.displayText
            teamTeamGrid.Item(teamConferenceCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_conferenceTextBox.displayText
            teamTeamGrid.Item(teamESPNRankingCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_ESPNRankingTextBox.displayText
            teamTeamGrid.Item(teamLossesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_lossesTextBox.displayText
            teamTeamGrid.Item(teamNotesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_notesTextBox.displayText
            teamTeamGrid.Item(teamRPICol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_RPITextBox.displayText
            teamTeamGrid.Item(teamSchoolNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_schoolNameTextBox.displayText
            teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_winLossDiffTextBox.displayText
            teamTeamGrid.Item(teamWinsCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_winsTextBox.displayText
            teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTab_teamNameTextBox.textColor
            teamTeamGrid.Item(teamProfileManagerIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = highestId + 1
            teamTeamGrid.Item(teamDateCreatedCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy H:mm:ss")
        End If

        'hides text boxes
        teamTab_hideTextBoxes()
        'changes team color in text labels as specified in the team data grid
        changeTeamTextColorTextLabels(teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.Selected)).Value)

        populateTeamTextLabels()
    End Sub



    'Developer Name: Stephen Durfey
    'Module Name: Athlete Profile Manager
    'Task(s): 3.3 Delete Athlete Profile
    '          3.3.1 Delete Athlete Name
    '	        3.3.1.1 Delete Athlete First Name
    '	        3.3.1.2 Delete Athlete Last Name
    '	        3.3.1.3 Delete Athlete Middle Initial
    '	        3.3.1.4 Delete Athlete Nickname
    '		   3.3.2 Delete Athlete Notes
    '		   3.3.3 Delete Athlete Number
    '		   3.3.4 Delete Athlete Picture(s)
    '		   3.3.5 Delete Athlete Statistics
    '			3.3.5.1 Delete Athlete Points per Game
    '			3.3.5.2 Delete Athlete Assists per Game
    '			3.3.5.3 Delete Athlete Rebounds per Game
    '			3.3.5.4 Delete Athlete Minutes per Game
    '			3.3.5.5 Delete Athlete Steals per Game
    '			3.3.5.6 Delete Athlete Free Throw Percentage 
    '          3.3.6 Delete Athlete Class Rank
    'Pre-Condition: Delete Button has been clicked
    'Post-Condition: The selected row in the athlete grid has been removed
    'Functionality: Deletes the currently selected athlete profile
    Private Sub athleteTab_deleteProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles athleteTab_deleteProfileButton.Click
        athleteAthleteGrid.Rows.Remove(athleteAthleteGrid.Rows(athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)))
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s): 2.3 Delete Team Profile
    '          2.3.1 Delete Team Name
    '          2.3.2 Delete Team Notes
    '          2.3.3 Delete Team Cheer
    '          2.3.4 Delete Team Conference
    '          2.3.5 Delete Team Picture(s)
    '          2.3.6 Delete Team Statistics
    '		    2.3.6.1 Delete Team Wins
    '		    2.3.6.2 Delete Team Losses
    '		    2.3.6.3 Delete Team Win Percentage
    '		    2.3.6.4 Delete Team Win/Loss Score Differential
    '		    2.3.6.5 Delete Team Ranking
    '			 2.3.6.5.1 Delete Team ESPN Poll Ranking
    '			 2.3.6.5.2 Delete Team Records and Percentage Index (RPI)
    '	       2.3.7 Delete School Name
    '	       2.3.8 Delete Date Added to System
    '	       2.3.9 Delete Team Roster
    'Pre-Condition: Delete Profile Button has been clicked
    'Post-Condition: The selected row in the team data grid has been removed
    'Functionality: Removes the currently selected row and team profile from team profile data grid
    Private Sub teamTab_deleteProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_deleteProfileButton.Click
        teamTeamGrid.Rows.Remove(teamTeamGrid.Rows(teamTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)))
    End Sub


    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Search Team name Radio button has been clicked
    'Post-Condition: All other radio search buttons are invisible, and team name text box is visible and has focus 
    'Functionality: Allows user to search by team name
    Private Sub teamTab_searchTeamRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_searchTeamRadio.CheckedChanged
        teamTab_hideSearchBoxes()
        teamTab_searchTeamTextBox.Visible = True
        teamTab_searchTeamRadio.Visible = True
        teamTab_searchByLabel.Text = "Browsing By Team Name"
        teamTab_searchTeamTextBox.Focus()
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Search School Name Radio button has been clicked
    'Post-Condition: All other radio search buttons are invisible, and school name text box is visible and has focus 
    'Functionality: Allows user to search by school name
    Private Sub teamTab_searchSchoolRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_searchSchoolRadio.CheckedChanged
        teamTab_hideSearchBoxes()
        teamTab_searchSchoolRadio.Visible = True
        teamTab_searchSchoolTextBox.Visible = True
        teamTab_searchByLabel.Text = "Browsing By School Name"
        teamTab_searchSchoolTextBox.Focus()
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Search Date Added Radio button has been clicked
    'Post-Condition: All other radio search buttons are invisible
    'Functionality: Allows user to search by date added
    Private Sub teamTab_searchDateAddedRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_searchDateAddedRadio.CheckedChanged

        'Sort by the date created column in ascending order
        teamTeamGrid.Sort(teamDateCreatedCol, System.ComponentModel.ListSortDirection.Ascending)

        teamTab_hideSearchBoxes()
        teamTab_searchDateAddedRadio.Visible = True
        teamTab_searchByLabel.Text = "Browsing By Date Added"
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Team Profile Manager
    'Task(s): 2.4.1 Search by Team Name
    'Pre-Condition: Radio button for searching by team name has been checked
    'Post-Condition: The team data grid only shows the rows matching the user input
    'Functionality: Allows the user to search team data grid by team name
    Private Sub teamTab_searchTeamTextBox_Load(ByRef sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_searchTeamTextBox.textChanged

        Dim numTeams As Integer = teamTeamGrid.Rows.Count

        For index As Integer = 0 To numTeams - 1
            Dim lowerString As String = teamTeamGrid.Item(teamTeamNameCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & teamTab_searchTeamTextBox.displayText.Trim & "*" And teamTeamGrid.Item(teamProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                teamTeamGrid.Rows(index).Visible = True
            Else
                teamTeamGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Team Profile Manager
    'Task(s): 2.4.3 Search by Conference
    'Pre-Condition: Radio button for searching by conference has been checked
    'Post-Condition: The team data grid only shows the rows matching the user input
    'Functionality: Allows the user to search team data grid by conference
    Private Sub teamTab_searchConferenceBox_Load(ByRef sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_searchConferenceTextBox.textChanged

        Dim numTeams As Integer = teamTeamGrid.Rows.Count

        For index As Integer = 0 To numTeams - 1
            Dim lowerString As String = teamTeamGrid.Item(teamConferenceCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & teamTab_searchConferenceTextBox.displayText.Trim & "*" And teamTeamGrid.Item(teamProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                teamTeamGrid.Rows(index).Visible = True
            Else
                teamTeamGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Modules: Team Profile Manager
    'Task(s): 2.4.2 Search by School Name
    'Pre-Condition: Radio button for searching by school name has been checked
    'Post-Condition: The team data grid only shows the rows matching the user input
    'Functionality: Allows the user to search team data grid by school name
    Private Sub teamTab_searchSchoolTextBox_Load(ByRef sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_searchSchoolTextBox.textChanged

        Dim numTeams As Integer = teamTeamGrid.Rows.Count

        For index As Integer = 0 To numTeams - 1
            Dim lowerString As String = teamTeamGrid.Item(teamSchoolNameCol.Index, index).Value

            If lowerString = Nothing Then
                lowerString = ""
            End If

            If lowerString.ToLower Like "*" & teamTab_searchSchoolTextBox.displayText.Trim & "*" And teamTeamGrid.Item(teamProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                teamTeamGrid.Rows(index).Visible = True
            Else
                teamTeamGrid.Rows(index).Visible = False
            End If
        Next
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s):2.1 Add Team Profile
    '         2.1.1 Add Team Name
    '         2.1.2 Add Team Notes
    '         2.1.3 Add Team Cheer
    '         2.1.4 Add Team Conference
    '         2.1.5 Add Team Picture(s)
    '          2.1.5.1 Select Picture(s) to Add
    '          2.1.6 Add Team Statistics
    '           2.1.6.1 Add Team Wins
    '           2.1.6.2 Add Team Losses
    '           2.1.6.3 Add Team Win Percentage
    '           2.1.6.4 Add Team Win/Loss Score Differential	
    '           2.1.6.5 Add Team Ranking
    '            2.1.6.5.1 Add Team ESPN Poll Ranking
    '            2.1.6.5.2 Add Team Records and Percentage Index (RPI)
    '         2.1.7 Add School Name
    '         2.1.8 Date Added to System
    'Pre-Condition: Add Team profile button has been clicked
    'Post-Condition: Unhides and clears all athlete text boxes for user input. default color is black
    'Functionality: Prepares form for addition of a new profile to the data grid
    Private Sub teamTab_addProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_addProfileButton.Click

        currentTeamProfileId = -2

        If currentProfileManagerId <> -1 Then
            teamTab_unhideTextBoxes()
            teamTab_pictureBox.Image = athleteProfileScreen.My.Resources.noImage

            teamTab_conferenceTextBox.displayText = ""
            teamTab_ESPNRankingTextBox.displayText = ""
            teamTab_lossesTextBox.displayText = ""
            teamTab_notesTextBox.displayText = ""
            teamTab_RPITextBox.displayText = ""
            teamTab_schoolNameTextBox.displayText = ""
            teamTab_teamNameTextBox.displayText = ""
            teamTab_winLossDiffTextBox.displayText = ""
            teamTab_winsTextBox.displayText = ""
            teamTab_cheerTextBox.displayText = ""
            changeTeamTextColorTextBox(Color.Black)

            'Ensure one of the textboxes does not get the focus
            teamTab_teamName.Focus()
        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before adding a team.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Browse Profile button has been clicked
    'Post-Condition: Radio search buttons are displayed, all text boxes are hidden, form is ready
    '                for browsing 
    'Functionality: Prepares form for profile browsing
    Private Sub teamTab_browseProfileButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_browseProfileButton.Click
        If currentProfileManagerId <> -1 Then

            teamTab_searchConferenceRadio.Checked = False
            teamTab_searchDateAddedRadio.Checked = False
            teamTab_searchSchoolRadio.Checked = False
            teamTab_searchTeamRadio.Checked = False

            teamTab_searchConferenceRadio.Visible = True
            teamTab_searchDateAddedRadio.Visible = True
            teamTab_searchSchoolRadio.Visible = True
            teamTab_searchTeamRadio.Visible = True
            teamTab_hideTextBoxes()

        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before browsing teams.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Manager
    'Task(s): N/A
    'Pre-Condition: Search Conference Radio button has been clicked
    'Post-Condition: All other radio search buttons are invisible, and conference text box is visible and has focus 
    'Functionality: Allows user to search by conference
    Private Sub teamTab_searchConferenceRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTab_searchConferenceRadio.CheckedChanged
        teamTab_hideSearchBoxes()
        teamTab_searchConferenceTextBox.Visible = True
        teamTab_searchConferenceRadio.Visible = True
        teamTab_searchByLabel.Text = "Browsing By Conference"
        teamTab_searchConferenceTextBox.Focus()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: Some other tab was active.
    'Post-Condition: The Team Profile tab is now active and updated for the
    '		circumstances the user has created.
    'Functionality: Updated the Team Profile tab for the circumstances
    '		provided by the user when the user navigates to this tab.
    Private Sub focusTeamTab() Handles teamProfileTab.Enter

        'Set up the team tab
        prepareTeam()
    End Sub

    
    'Developer Name: Jason Lyle and Stephen Durfey
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: The team grid exists and is populated with at least one selectable row.
    'Post-Condition: The team profile tab is appropriately updated.
    'Functionality: Update the team profile tab appropriately when the selection of
    '       the team changes.
    Private Sub teamTeamGrid_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamTeamGrid.SelectionChanged

        currentTeamProfileId = teamTeamGrid.Item(teamProfileIdCol.Index, teamTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value

        updateTeamAddToCompareBtnStatus()

        teamTab_hideTextBoxes()
        loadTeamRoster()
        populateTeamTextLabels()

    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): 2.6 Add To Team Comparison
    'Pre-Condition: An team is selected.
    'Post-Condition: The selected team is added to the comparison list.
    'Functionality: Add the selected team to the comparison list.
    Private Sub teamAddToCompare_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamAddToCompareBtn.Click

        'If the user has opened a profile manager, add the athlete to the
        '		compare list
        If currentProfileManagerId <> -1 Then
            ReDim Preserve teamCompare(teamCompare.Count)

            teamCompare(teamCompare.Count - 1) = currentTeamProfileId
            MsgBox("This team has been added to the compare list.")

            teamAddToCompareBtn.Enabled = False
            'Otherwise, alert the user that they must open up a profile manager
            '		file before preforming this operation
        Else
            MsgBox("You must select a profile manager file" & Chr(13) & Chr(10) & "before adding a team to the comparison list.", MsgBoxStyle.DefaultButton1, "")
        End If
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): 2.6 Print Team Profile
    'Pre-Condition: There is an existing team profile to print.
    'Post-Condition: The team profile has been printed.
    'Functionality: Print the current team profile.
    Private Sub teamPrintProfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamPrintProfile.Click
        'To be implemented at a later date
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): 2.5 Manage Team Roster, 2.5.2 Edit Player on Roster
    'Pre-Condition: There is at least one player on the roster
    'Post-Condition: The user is in the editing screen for an athlete
    'Functionality: Edit the user selected in the team roster grid.
    Private Sub teamEditPlayerbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamEditPlayerbtn.Click
        Dim athleteToEdit As String = teamRosterGrid.Item(teamRosterAthleteProfileIdCol.Index, teamRosterGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value
        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count
        Dim athleteRow As Integer = 0

        'Go through every athlete looking for the right one
        For index As Integer = 0 To numAthletes - 1

            'If we find the right athlete, then save the row index and get out of the for loop
            If athleteToEdit = athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, index).Value _
                And currentProfileManagerId = athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value Then
                athleteRow = index
                index = numAthletes
            End If

        Next

        'Go to the athlete profile tab and get it into
        'edit mode for the correct athlete
        ProfileManagerTabs.SelectedTab = athleteProfileTab
        prepareAthlete()
        athleteAthleteGrid.Rows(athleteRow).Selected = True
        editProfileButton_Click(Me, System.EventArgs.Empty)
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): 2.5 Manage Team Roster, 2.5.3 Delete Player from Roster
    'Pre-Condition: There is at least one player on the roster.
    'Post-Condition: the player is deleted form the roster.
    'Functionality: Delete the selected player from the roster.
    Private Sub teamRemoveFromRosterBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamRemoveFromRosterBtn.Click
        Dim athleteToRemove As String = teamRosterGrid.Item(teamRosterAthleteProfileIdCol.Index, teamRosterGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value
        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        'Go through every athlete
        For index As Integer = 0 To numAthletes - 1

            'If we find our athlete, then clear out the athlete's team field
            'and exit the loop
            If athleteToRemove = athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, index).Value _
                And currentProfileManagerId = athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value Then
                athleteAthleteGrid.Item(athleteTeamNameCol.Index, index).Value = ""
                index = numAthletes
            End If

        Next

        'Set up the team tab
        prepareTeam()
        loadTeamRoster()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: The roster and buttons are loaded
    'Post-Condition: The buttons are enabled or disabled appropriately
    'Functionality: Enable/Disable roster buttons appropriately
    Private Sub teamRosterGrid_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles teamRosterGrid.SelectionChanged

        'Set the status of the remove athlete and edit athlete
        'buttons for the Roster appropriately
        If teamRosterGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected) >= 0 Then
            teamEditPlayerbtn.Enabled = True
            teamRemoveFromRosterBtn.Enabled = True
        Else
            teamEditPlayerbtn.Enabled = False
            teamRemoveFromRosterBtn.Enabled = False
        End If

    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: The team add to compare button has been loaded.
    'Post-Condition: The save profile button is enabled or disabled appropriately
    'Functionality: Enable/Disable the save profile button appropriately
    Private Sub teamAddToCompare_VisibilityChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles teamAddToCompareBtn.VisibleChanged

        'If the add to comparison button is visible, disable the save profile button
        'and if the add to comparison button is invisible, enable the save profile button.
        teamTab_saveProfileButton.Enabled = Not teamAddToCompareBtn.Visible
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: The team save profile button has been loaded
    'Post-Condition: The add to compare button is enabled or disabled appropriately
    'Functionality: Enable/Disable the add to compare button appropriately
    Private Sub teamTabSaveProfileButton_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles teamTab_saveProfileButton.VisibleChanged

        'If the save profile button is visible, disable the add to comparison button
        'and if the save to profile button is invisible, enable the add to profile button.
        teamAddToCompareBtn.Enabled = Not teamTab_saveProfileButton.Visible
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): N/A
    'Pre-Condition: Some other tab was active.
    'Post-Condition: The Comparisons tab is now active and updated for the
    '		circumstances the user has created.
    'Functionality: Updated the Comparisons tab for the circumstances
    '		provided by the user when the user navigates to this tab.
    Private Sub focusComparisonTab() Handles comparisonTab.Enter

        'Set up the compare tab
        prepareCompare()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): 4.2 Athlete Comparison, 4.2.1 Delete Athlete from Comparison,
    '		4.2.3 Compare All Selected Athletes
    'Pre-Condition: None
    'Post-Condition: The Athlete radio button is checked and the comparison
    '		screen has been updated for the athelete comparison.
    'Functionality: Sets up the comparison tab to do the athlete comparison and
    '		executes it.
    Private Sub comparisonAthleteRadiobtn_Checked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comparisonAthleteRadiobtn.Click

        'Set up the compare tab
        prepareCompare()

        'Set the team grid to not visible and the athlete grid to visible
        comparisonTeamGrid.Visible = False
        comparisonAthleteGrid.Visible = True
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): 4.1 Team Comparison, 4.1.1 Delete Team from Comparison,
    '		4.1.3 Compare All Selected teams
    'Pre-Condition: None
    'Post-Condition: The Team radio button is checked and the comparison
    '		screen has been updated for the team comparison.
    'Functionality: Sets up the comparison tab to do the team comparison and
    '		executes it.
    Private Sub comparisonTeamRadiobtn_Checked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comparisonTeamRadiobtn.Click

        'SEt up the compare tab
        prepareCompare()

        'Set the athlete grid to not visible and the team grid to visible
        comparisonAthleteGrid.Visible = False
        comparisonTeamGrid.Visible = True
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): 4. Comparisons, 4.1 Team Comparison,
    '		4.1.1 Delete Team from Comparison, 4.1.2 Clear all teams from Comparison,
    '		4.2 Athlete Comparison, 4.2.1 Delete Athlete from Comparison,
    '		4.2.2 Clear All Athletes from Comparison
    'Pre-Condition: Rows are loaded into the comparison list datagrid and
    '		either the team or athlete comparison option has been selected.
    'Post-Condition: The row clicked changes the value of its checkbox (checked
    '		or unchecked) and the clear list and delete from list buttons are set
    '		to the correct state of being enabled.
    'Functionality: Setup all the options for the comparison.  When a row is
    '		clicked, change the buttons to either enabled or disabled.
    Private Sub comparisonListGrid_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles comparisonListGrid.CellClick

        'Get what the value of the checkbox of the clicked row should be after this click
        Dim newVal As Boolean = Not comparisonListGrid.Item(comparisonListCheckboxCol.Index, e.RowIndex).Value

        'Set the value of the checkbox
        comparisonListGrid.Item(comparisonListCheckboxCol.Index, e.RowIndex).Value = newVal

        'If the checkbox is now checked, then set the comparison buttons
        '		as enabled
        If newVal Then
            comparisonRemoveBtn.Enabled = True
            comparisonClearListBtn.Enabled = True
            'Otherwise, update the buttons appropriately
        Else
            updateComparisonButtons()
        End If
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): 4. Comparisons, 4.1.1 Delete Team from Comparison,
    '		4.2.1 Delete Athlete from Comparison
    'Pre-Condition: None
    'Post-Condition: The selected entities are removed from the comparison list.
    'Functionality: Remove entities from the comparison list.
    Private Sub comparisonRemoveBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comparisonRemoveBtn.Click

        'The number of entities to delete
        Dim numToDelete As Integer = 0

        'The number of entities in the list
        Dim numInList As Integer = comparisonListGrid.Rows.Count

        'The index which to add entites that remain to the
        '		appropriate compare list
        Dim adderIndex As Integer = 0

        'If removing from the athlete compare list
        If comparisonAthleteRadiobtn.Checked Then

            'Loop through each athlete
            For index As Integer = 0 To numInList - 1

                'If the row is checked, then increase the number to delete
                If comparisonListGrid.Item(comparisonListCheckboxCol.Index, index).Value Then
                    numToDelete = numToDelete + 1
                    'Otherwise, add the athlete to the first available spot in the
                    '		comparison list
                Else
                    athleteCompare(adderIndex) = comparisonListGrid.Item(comparisonListEntityProfileIdCol.Index, index).Value
                    adderIndex = adderIndex + 1
                End If

            Next

            'Resize the compare array to the length of just those athletes
            '		to keep
            ReDim Preserve athleteCompare(numInList - numToDelete - 1)

            'If removing teams from the comparison list
        ElseIf comparisonTeamRadiobtn.Checked Then

            'Loop through each of the teams
            For index As Integer = 0 To numInList - 1

                'If the row is checked, then increase the number of teams to
                '		delete
                If comparisonListGrid.Item(comparisonListCheckboxCol.Index, index).Value Then
                    numToDelete = numToDelete + 1
                    'Otherwise, add the team to the first available spot in the
                    '		comparison list
                Else
                    teamCompare(adderIndex) = comparisonListGrid.Item(comparisonListEntityProfileIdCol.Index, index).Value
                    adderIndex = adderIndex + 1
                End If

            Next

            'Resize the array to just fit the teams remaining in the list
            ReDim Preserve teamCompare(numInList - numToDelete - 1)
        End If

        'Update the compare tab
        prepareCompare()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): 4. Compare, 4.1.2 Clear All Teams from Comparison, 4.2.2 Clear All Athletes from Comparison
    'Pre-Condition: None
    'Post-Condition: All entities are removed from the comparison list.
    'Functionality: Remove all entities form the comparison list.
    Private Sub comparisonClearListBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comparisonClearListBtn.Click

        'Reset the arrays so that no entity's profile is listed in the corresponding compare list
        If comparisonAthleteRadiobtn.Checked Then
            athleteCompare = New String() {-1}
        ElseIf comparisonTeamRadiobtn.Checked Then
            teamCompare = New String() {-1}
        End If

        'Update the compare tab to reflect the changes
        prepareCompare()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): N/A
    'Pre-Condition: The selection of the comparisonAthleteGrid has changed
    'Post-Condition: The selected row is unselected
    'Functionality: Do not allow users to select a row in the comparisonAthleteGrid
    Private Sub comparisonAthleteGrid_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles comparisonAthleteGrid.SelectionChanged

        'Get the row that was just highlighted
        Dim rowHighlighted As Integer = comparisonAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

        'If this functions is not being called for the unhighlighting event
        '   then unhighlight the highlighted row.
        If rowHighlighted >= 0 Then
            comparisonAthleteGrid.Rows(rowHighlighted).Selected = False
        End If
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): N/A
    'Pre-Condition: The selection of the comparisonTeamGrid has changed
    'Post-Condition: The selected row is unselected
    'Functionality: Do not allow users to select a row in the comparisonTeamGrid
    Private Sub comparisonTeamGrid_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles comparisonTeamGrid.SelectionChanged

        'Get the row that was just highlighted
        Dim rowHighligthed As Integer = comparisonTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

        'If this functions is not being called for the unhighlighting event
        '   then unhighlight the highlighted row.
        If rowHighligthed >= 0 Then
            comparisonTeamGrid.Rows(rowHighligthed).Selected = False
        End If
    End Sub


    'Overridden Functions

    'Developer Name: Jason Lyle
    'Module Name: Mouse control
    'Task(s): N/A
    'Pre-Condition: Some form of key down event has occured.
    'Post-Condition: The key down event has been trapped and handled appropriately.
    'Functionality: Trap keyboard keys and use the arrow keys and the enter key to
    '		simulate a mouse.
    Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean

        'If the function gets a keydown event...
        If (msg.Msg = WM_KEYDOWN) Or (msg.Msg = WM_SYSKEYDOWN) Then

            'If the key is the left arrow, move the mouse left
            If (keyData = Keys.Left) Or (keyData = Keys.NumPad4) Then
                keyMouseMove(-7, 0)

                'If the key is the right arrow, move the mouse right
            ElseIf (keyData = Keys.Right) Or (keyData = Keys.NumPad6) Then
                keyMouseMove(7, 0)

                'If the key is the up arrow, move the mouse up
            ElseIf (keyData = Keys.Up) Or (keyData = Keys.NumPad8) Then
                keyMouseMove(0, -7)

                'If the key is the down arrow, move the mouse down.
            ElseIf (keyData = Keys.Down) Or (keyData = Keys.NumPad2) Then
                keyMouseMove(0, 7)

                'If the key is the enter key, then click the mouse down
            ElseIf (keyData = Keys.Enter) Or (keyData = Keys.NumPad5) Then
                keyMouseDown(False)
            End If

        End If

        'Returning true keeps the event from bubbling up.
        'This means that the system is informed that the
        'event has been handled.
        Return True
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Mouse control
    'Task(s): N/A
    'Pre-Condition: Some form of key up event has occured.
    'Post-Condition: The key up event has been trapped and handled appropriately.
    'Functionality: Thrap keyboard keys up event to simulate a mouse.
    Protected Overrides Function ProcessKeyPreview(ByRef m As System.Windows.Forms.Message) As Boolean

        'If there is a key up event...
        If (m.Msg = WM_KEYUP) Or (m.Msg = WM_SYSKEYUP) Then

            'If that event is the enter key up, then insert a left mouse
            '		button up into the clickstream.
            If m.WParam = Keys.Enter Then
                keyMouseUp()
            End If

        End If

        'Returning true keeps the event from bubbling up.
        'This means that the system is informed that the
        'event has been handled.
        Return True
    End Function

    'Other Functions

    'Private Functions

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Program
    'Task(s): N/A
    'Pre-Condition: The profile manager program has been loaded.
    'Post-Condition: The profile manager program is loaded with base data.
    'Functionality: Place data in the program so the program can be demoed.
    Private Sub load_base_data()
        'Insert a profile manager file
        profileManagerProfileManagerGrid.Rows.Add()
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = 0
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerFileNameCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = "CS324 Project Profile Manager"
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerDateCreatedCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        'Insert Athletes into the datagrid
        'Akron Athletes
        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Brett"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "McKnight"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "so"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Zips"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 23
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 11.2
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.1
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3.6
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 21.3
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.6
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.683
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Nate"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Linhart"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Zips"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 33
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 10.3
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.5
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 6.2
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 29.9
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.7
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.813
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Chris"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "McKnight"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "jr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Zips"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 30
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 9.2
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.1
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4.7
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 24.8
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.8
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.654
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Anthony"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Hitchens"
        athleteAthleteGrid.Item(athleteNicknameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Humpty"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "fr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Zips"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 24
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 8.8
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.2
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.4
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 22.5
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.3
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.75
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Darryl"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Roberts"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "jr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Zips"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 12
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 8.3
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.6
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.8
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 25.9
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.7
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.926
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")


        'Miami Athletes
        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Michael"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bramos"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Red Hawks"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 24
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 17.9
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.7
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4.1
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 35.2
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.833
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 6
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Kenny"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Hayes"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Red Hawks"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 14
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 13.9
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3.8
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3.1
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 31.1
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.8
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.794
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 7
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Tyler"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Dierkers"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Red Hawks"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 9.2
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.1
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 7.3
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 36.4
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.7
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.72
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 8
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Antonio"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Ballard"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "so"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Red Hawks"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 35
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 6.7
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.3
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5.1
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 24.2
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.7
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.632
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 9
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Eric"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Pollitz"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Red Hawks"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 21
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5.6
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.8
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.6
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 26.2
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.5
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.741
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        'Ohio athletes
        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 10
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Jerome"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Tillman"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bobcats"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 33
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 17.7
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.2
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 8.1
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 32.7
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.1
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.736
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 11
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Justin"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Orr"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bobcats"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 25
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 10.2
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.5
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3.6
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 28.1
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.8
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.75
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 12
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Steven"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Coleman"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "fr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bobcats"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 9.8
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.5
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3.2
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 26.8
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.7
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.658
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 13
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Tommy"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Freeman"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "so"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bobcats"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 24
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 7.4
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.3
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.9
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 26.4
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.4
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.807
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 14
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Michael"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Allen"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bobcats"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 6.9
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4.3
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.1
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 30
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.4
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.707
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        'Toledo athletes
        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 15
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Tyrone"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Kent"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Rockets"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 31
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 15.1
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.1
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5.2
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 33
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.3
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.679
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 16
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Jonathan"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Amos"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Rockets"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 13.6
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3.2
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4.8
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 28.7
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.678
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 17
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Justin"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Anyijong"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "so"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Rockets"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 9.7
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.5
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 6.4
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 32.1
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.8
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.711
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 18
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Anthony"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Byrd"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "sr"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Rockets"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 34
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5.3
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1.5
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2.1
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 26.9
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.9
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.765
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        athleteAthleteGrid.Rows.Add()
        athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 19
        athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Mohamed"
        athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Lo"
        athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "so"
        athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My Notes"
        athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Rockets"
        athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 33
        athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5.2
        athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.5
        athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4.5
        athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 19.7
        athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.2
        athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0.5
        athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        'Insert Teams into the datagrid
        teamTeamGrid.Rows.Add()
        teamTeamGrid.Item(teamProfileIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        teamTeamGrid.Item(teamTeamNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Zips"
        teamTeamGrid.Item(teamPictureCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        teamTeamGrid.Item(teamSchoolNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Akron University"
        teamTeamGrid.Item(teamConferenceCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "MAC"
        teamTeamGrid.Item(teamCheerCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Some cheer"
        teamTeamGrid.Item(teamNotesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My notes"
        teamTeamGrid.Item(teamWinsCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 23
        teamTeamGrid.Item(teamLossesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 13
        teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        teamTeamGrid.Item(teamESPNRankingCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        teamTeamGrid.Item(teamRPICol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5
        teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        teamTeamGrid.Item(teamProfileManagerIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        teamTeamGrid.Item(teamDateCreatedCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        teamTeamGrid.Rows.Add()
        teamTeamGrid.Item(teamProfileIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 1
        teamTeamGrid.Item(teamTeamNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Falcons"
        teamTeamGrid.Item(teamPictureCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        teamTeamGrid.Item(teamSchoolNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bowling Green State University"
        teamTeamGrid.Item(teamConferenceCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "MAC"
        teamTeamGrid.Item(teamCheerCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Some cheer"
        teamTeamGrid.Item(teamNotesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My notes"
        teamTeamGrid.Item(teamWinsCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 19
        teamTeamGrid.Item(teamLossesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 14
        teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        teamTeamGrid.Item(teamESPNRankingCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        teamTeamGrid.Item(teamRPICol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5
        teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        teamTeamGrid.Item(teamProfileManagerIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        teamTeamGrid.Item(teamDateCreatedCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        teamTeamGrid.Rows.Add()
        teamTeamGrid.Item(teamProfileIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 2
        teamTeamGrid.Item(teamTeamNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Red Hawks"
        teamTeamGrid.Item(teamPictureCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        teamTeamGrid.Item(teamSchoolNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Miami University"
        teamTeamGrid.Item(teamConferenceCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "MAC"
        teamTeamGrid.Item(teamCheerCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Some cheer"
        teamTeamGrid.Item(teamNotesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My notes"
        teamTeamGrid.Item(teamWinsCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 17
        teamTeamGrid.Item(teamLossesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 13
        teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        teamTeamGrid.Item(teamESPNRankingCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        teamTeamGrid.Item(teamRPICol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5
        teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        teamTeamGrid.Item(teamProfileManagerIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        teamTeamGrid.Item(teamDateCreatedCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        teamTeamGrid.Rows.Add()
        teamTeamGrid.Item(teamProfileIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        teamTeamGrid.Item(teamTeamNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Bobcats"
        teamTeamGrid.Item(teamPictureCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        teamTeamGrid.Item(teamSchoolNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Ohio University"
        teamTeamGrid.Item(teamConferenceCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "MAC"
        teamTeamGrid.Item(teamCheerCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Some cheer"
        teamTeamGrid.Item(teamNotesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My notes"
        teamTeamGrid.Item(teamWinsCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 15
        teamTeamGrid.Item(teamLossesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 17
        teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        teamTeamGrid.Item(teamESPNRankingCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        teamTeamGrid.Item(teamRPICol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5
        teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        teamTeamGrid.Item(teamProfileManagerIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        teamTeamGrid.Item(teamDateCreatedCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        teamTeamGrid.Rows.Add()
        teamTeamGrid.Item(teamProfileIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        teamTeamGrid.Item(teamTeamNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Rockets"
        teamTeamGrid.Item(teamPictureCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = My.Resources.noImage
        teamTeamGrid.Item(teamSchoolNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Toledo University"
        teamTeamGrid.Item(teamConferenceCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "MAC"
        teamTeamGrid.Item(teamCheerCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "Some cheer"
        teamTeamGrid.Item(teamNotesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = "My notes"
        teamTeamGrid.Item(teamWinsCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 7
        teamTeamGrid.Item(teamLossesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 25
        teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 3
        teamTeamGrid.Item(teamESPNRankingCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 4
        teamTeamGrid.Item(teamRPICol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 5
        teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Color.Black
        teamTeamGrid.Item(teamProfileManagerIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = 0
        teamTeamGrid.Item(teamDateCreatedCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1.1 Create New Profile Manager
    'Pre-Condition: None
    'Post-Condition: A new profile manager is created
    'Functionality: Add a new profile manager
    Private Sub addProfileManager(ByVal name As String)

        'Get the number of profile managers
        Dim numProfileManagers = profileManagerProfileManagerGrid.Rows.Count

        'Flag to check if the name provided is a duplicate
        Dim duplicateName As Boolean = False

        'The highest number profileManagerID
        Dim highestNum As Integer = -1

        Dim currentVal As Integer

        'Trim any whitespace form the name
        name = name.Trim()

        'Loop through all the profile managers
        For index As Integer = 0 To numProfileManagers - 1

            'If the name supplied already exists, notify the user and exit
            '		the function
            If name = profileManagerProfileManagerGrid.Item(profileManagerProfileManagerFileNameCol.Index, index).Value Then
                duplicateName = True
                MsgBox("A profile manager already exists with this name." & Chr(13) & Chr(10) & "Please choose another name.")
                Return
            End If

        Next

        'Loop through all the profile managers
        For index As Integer = 0 To numProfileManagers - 1

            'holding place for the profile manager ID that the loop is currently
            '		on
            currentVal = Val(profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, index).Value)

            'If the current profile manager id is greater than the hightest one
            '		so far, save it in the highestNum variable
            If currentVal > highestNum Then
                highestNum = currentVal
            End If

        Next

        'Add a new profile manager with as name with an ID of highestnum + 1
        profileManagerProfileManagerGrid.Rows.Add()
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = highestNum + 1
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerFileNameCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = name
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerDateCreatedCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): 1.6 Copy Existing Profile Manager
    'Pre-Condition: That there exists a profile manager to copy.
    'Post-Condition: A copy of the existing profile manager is made.
    'Functionality: Create a copy of a profile manager
    Private Sub copyProfileManager(ByVal name As String)

        'The id of the profile manage to copy
        Dim profileManagerIdToCopy As String = profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, profileManagerProfileManagerGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value

        'the number of profile managers
        Dim numProfileManagers = profileManagerProfileManagerGrid.Rows.Count

        'A flag representing  if name is a duplicate
        Dim duplicateName As Boolean = False

        'A variable storing the highest number profile manager ID
        Dim highestNum As Integer = -1
        Dim currentVal As Integer

        'The number of athletes
        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        'The number of teams
        Dim numTeams As Integer = teamTeamGrid.Rows.Count

        'Trim the name passed in
        name = name.Trim()


        'Check for duplicate names
        For index As Integer = 0 To numProfileManagers - 1
            If name = profileManagerProfileManagerGrid.Item(profileManagerProfileManagerFileNameCol.Index, index).Value Then
                duplicateName = True
                MsgBox("A profile manager already exists with this name." & Chr(13) & Chr(10) & "Please choose another name.")
                Return
            End If

        Next

        'Loop through all profile managers and find the highest value ID
        For index As Integer = 0 To numProfileManagers - 1
            currentVal = Val(profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, index).Value)

            If currentVal > highestNum Then
                highestNum = currentVal
            End If

        Next

        highestNum = highestNum + 1

        'Add copied profile manager with the new name
        profileManagerProfileManagerGrid.Rows.Add()
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerProfileManagerIdCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = highestNum
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerFileNameCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = name
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerDateCreatedCol.Index, (profileManagerProfileManagerGrid.Rows.Count - 1)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

        'Go through all the athletes, looking For the ones that are associated
        '		with the profile manager to copy.  When an athlete is found that
        '		is associated with the profile manager to copy, it is added
        '		with an association to the new profile manager
        For index As Integer = 0 To numAthletes - 1

            If athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = profileManagerIdToCopy Then

                athleteAthleteGrid.Rows.Add()
                athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, index).Value
                athleteAthleteGrid.Item(athleteFirstNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteFirstNameCol.Index, index).Value
                athleteAthleteGrid.Item(athleteLastNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteLastNameCol.Index, index).Value
                athleteAthleteGrid.Item(athletePictureCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athletePictureCol.Index, index).Value
                athleteAthleteGrid.Item(athleteClassRankCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteClassRankCol.Index, index).Value
                athleteAthleteGrid.Item(athleteNotesCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteNotesCol.Index, index).Value
                athleteAthleteGrid.Item(athleteTeamNameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteTeamNameCol.Index, index).Value
                athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, index).Value
                athleteAthleteGrid.Item(athletePtsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athletePtsPerGameCol.Index, index).Value
                athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, index).Value
                athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, index).Value
                athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, index).Value
                athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, index).Value
                athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, index).Value
                athleteAthleteGrid.Item(athleteTextColorCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteTextColorCol.Index, index).Value
                athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = highestNum
                athleteAthleteGrid.Item(athleteDateCreatedCol.Index, athleteAthleteGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

            End If

        Next

        'Go through all the teams, looking For the ones that are associated
        '		with the profile manager to copy.  When a team is found that
        '		is associated with the profile manager to copy, it is added
        '		with an association to the new profile manager
        For index As Integer = 0 To numTeams - 1

            If teamTeamGrid.Item(teamProfileManagerIdCol.Index, index).Value = profileManagerIdToCopy Then

                teamTeamGrid.Rows.Add()
                teamTeamGrid.Item(teamProfileIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamProfileIdCol.Index, index).Value
                teamTeamGrid.Item(teamTeamNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamTeamNameCol.Index, index).Value
                teamTeamGrid.Item(teamPictureCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamPictureCol.Index, index).Value
                teamTeamGrid.Item(teamSchoolNameCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamSchoolNameCol.Index, index).Value
                teamTeamGrid.Item(teamConferenceCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamConferenceCol.Index, index).Value
                teamTeamGrid.Item(teamCheerCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamCheerCol.Index, index).Value
                teamTeamGrid.Item(teamNotesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamNotesCol.Index, index).Value
                teamTeamGrid.Item(teamWinsCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamWinsCol.Index, index).Value
                teamTeamGrid.Item(teamLossesCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamLossesCol.Index, index).Value
                teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, index).Value
                teamTeamGrid.Item(teamESPNRankingCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamESPNRankingCol.Index, index).Value
                teamTeamGrid.Item(teamRPICol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamRPICol.Index, index).Value
                teamTeamGrid.Item(teamTextColorCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamTextColorCol.Index, index).Value
                teamTeamGrid.Item(teamProfileManagerIdCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = highestNum
                teamTeamGrid.Item(teamDateCreatedCol.Index, teamTeamGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = Date.Now.ToString("MM/dd/yyyy HH:mm:ss")

            End If

        Next

    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager Management
    'Task(s): N/A
    'Pre-Condition: That there exists a profile manager to rename.
    'Post-Condition: The selected profile manager is renamed.
    'Functionality: Rename the selected profile manager.
    Sub renameProfileManager(ByVal name As String)

        'Get the number of proifile managers
        Dim numProfileManagers = profileManagerProfileManagerGrid.Rows.Count

        'A flag representing if the parameter passed in is a duplicate name
        Dim duplicateName As Boolean = False

        'trip the name
        name = name.Trim()

        'Check to see if the parameter is a duplicate name
        For index As Integer = 0 To numProfileManagers - 1

            If name = profileManagerProfileManagerGrid.Item(profileManagerProfileManagerFileNameCol.Index, index).Value Then
                duplicateName = True
                MsgBox("A profile manager already exists with this name." & Chr(13) & Chr(10) & "Please choose another name.")
                Return
            End If

        Next

        'If execution reaches this point, the name is not a duplicate so rename
        '		the profile manager with the name supplied
        profileManagerProfileManagerGrid.Item(profileManagerProfileManagerFileNameCol.Index, profileManagerProfileManagerGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)).Value = name
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: The athlete datagrid has been loaded with all of the data.
    'Post-Condition: The athlete datagrid is only displaying the data that
    '		meets the criteria set out by the user.
    'Functionality: Set up the athlete profile tab to display the correct
    '		information.
    Private Sub prepareAthlete()

        'Get the number of athletes
        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        'Loop through all the athletes
        For index As Integer = 0 To numAthletes - 1

            'If the athlete is associated with the current profile manager,
            '		display the athlete
            If athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                athleteAthleteGrid.Rows(index).Visible = True
                'Otherwise, hide the athlete
            Else
                athleteAthleteGrid.Rows(index).Visible = False
            End If

        Next

        'If now row is selected, get the first row that is visible and select it
        If athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected) = -1 Then
            Dim rowToSelect As Integer = athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Visible)
            If rowToSelect >= 0 Then
                athleteAthleteGrid.Rows(rowToSelect).Selected = True
            End If
        End If

        'Update the add to compare list button
        updateAthleteAddToCompareBtnStatus()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: the athleteAddToCompareBtn has been created.
    'Post-Condition: The athleteAddToCompareBtn has been enabled or 
    '       disabled appropriately.
    'Functionality: Update the status of the addAthleteToComparisonBtn
    Private Sub updateAthleteAddToCompareBtnStatus()

        'For each athlete in the compare list, check to see if it is the same
        '		one as the current athlete.  If it is, then disable the add to
        '		comparison button (the athlete is already in the comparison)
        For Each athlete As String In athleteCompare

            If athlete = currentAthleteProfileId Then
                athleteTab_AddToCompareBtn.Enabled = False
                Return
            End If

        Next

        'If program execution reaches this point, then the athlete is not in the
        '		compare list and so the add to compare list button should be enabled
        athleteTab_AddToCompareBtn.Enabled = True
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: The team datagrid has been loaded with all of the data.
    'Post-Condition: The team datagrid is only displaying the data that
    '		meets the criteria set out by the user.
    'Functionality: Set up the team profile tab to display the correct
    '		information.
    Private Sub prepareTeam()

        'Get the number of teams
        Dim numTeams As Integer = teamTeamGrid.Rows.Count

        'Loop through all of the teams
        For index As Integer = 0 To numTeams - 1

            'If the team is associated with the current profile manager, then
            '		make it visible, otherwise hide it
            If teamTeamGrid.Item(teamProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                teamTeamGrid.Rows(index).Visible = True
            Else
                teamTeamGrid.Rows(index).Visible = False
            End If

        Next

        'If there is not a row selected, select the first visible row
        If teamTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected) = -1 Then

            Dim rowToSelect As Integer = teamTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Visible)
            If rowToSelect >= 0 Then
                teamTeamGrid.Rows(rowToSelect).Selected = True
            End If

        End If

        'Update the add to compare list button
        updateTeamAddToCompareBtnStatus()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: the teamAddToCompareBtn has been created.
    'Post-Condition: The teamAddToCompareBtn has been enabled or 
    '       disabled appropriately.
    'Functionality: Update the status of the addTeamToComparisonBtn
    Private Sub updateTeamAddToCompareBtnStatus()

        'For each team in the compare list, check ifit is the current team.  If
        '		it is, disable the add to compare list button and exit the function
        For Each team As String In teamCompare
            If team = currentTeamProfileId Then
                teamAddToCompareBtn.Enabled = False

                Return
            End If
        Next

        'If execution reaches here, then the team is not in the compare list
        '		and the add to compare list button should be enabled
        teamAddToCompareBtn.Enabled = True
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Team Profile Management
    'Task(s): 2.5 Manage Team Roster, 2.5.1 Add Player To Roster,
    '		2.5.2 Edit Player on Roster, 2.5.3 Delete Player from Roster
    'Pre-Condition: None
    'Post-Condition: the team roster datagrid is loaded with the correct
    '		information.
    'Functionality: Loads the team roster datagrid based on the team that is
    '		selected in the team datagrid
    Private Sub loadTeamRoster()

        'Get the number of athletes
        Dim numAthletes As Integer = athleteAthleteGrid.Rows.Count

        'Get the number of teams
        Dim numTeams As Integer = teamTeamGrid.Rows.Count

        'Variable for the current team name
        Dim currentTeamName As String = "-1"

        'Loop through all the teams
        For index As Integer = 0 To numTeams - 1

            'If the team is the current team, then store that team name in the 
            '		currentTeamName variable
            If teamTeamGrid.Item(teamProfileIdCol.Index, index).Value = currentTeamProfileId Then
                currentTeamName = teamTeamGrid.Item(teamTeamNameCol.Index, index).Value
            End If

        Next

        'Clear the contentes of the team roster grid
        teamRosterGrid.Rows.Clear()

        'Loop through all the athletes
        For index As Integer = 0 To numAthletes - 1

            'If the athletes is on the team stored in currentTeam name, add the
            '		athlete to the team roster grid
            If athleteAthleteGrid.Item(athleteTeamNameCol.Index, index).Value.ToString = currentTeamName _
                And athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index).Value = currentProfileManagerId Then
                teamRosterGrid.Rows.Add()
                teamRosterGrid.Item(teamRosterAthleteProfileIdCol.Index, teamRosterGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, index).Value
                teamRosterGrid.Item(teamRosterPlayerNumberCol.Index, teamRosterGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, index).Value
                teamRosterGrid.Item(teamRosterPlayerName.Index, teamRosterGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = (athleteAthleteGrid.Item(athleteLastNameCol.Index, index).Value & ", " & athleteAthleteGrid.Item(athleteFirstNameCol.Index, index).Value)
            End If

        Next

    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): 4. Comparisons, 4.1 Team Comparison,
    '		4.1.1 Delete Team from Comparison, 4.1.3 Compare All Selected Teams,
    '		4.2 Athlete Comparison, 4.2.1 Delete Athlete from Comparison,
    '		4.2.3 Compare All Selected Athletes
    'Pre-Condition: The athlete profile datagrid and team profile datagrid are
    '		loaded with data.
    'Post-Condition: the compare list and the actual comparison datagrid are
    '		loaded with the data of the entities to be compared.
    'Functionality: This function sets up the comparison datagrids by taking
    '		information from the athlete and team datagrids according to the type
    '		of comparison and the entities listed to compare.
    Private Sub prepareCompare()

        'Length of the compare list
        Dim compareListLen As Integer

        'Number of eintities
        Dim entityListLen As Integer

        'Clear the comparison list grid, the ahtlete comparison grid, and the
        '	team comparison grids
        comparisonListGrid.Rows.Clear()
        comparisonAthleteGrid.Rows.Clear()
        comparisonTeamGrid.Rows.Clear()

        'If executing an athlete comparison
        If comparisonAthleteRadiobtn.Checked Then

            'Get the numer of athletes in the athlete comparison list
            compareListLen = athleteCompare.Length - 1

            'Get the numer of ahtletes
            entityListLen = athleteAthleteGrid.Rows.Count - 1

            'For every athlete in the comparison list, loop through all the
            '		athletes
            For index As Integer = 0 To compareListLen

                For index1 As Integer = 0 To entityListLen

                    'If the athlete in the overall list matches the athlete in
                    '		the compare list and is associated with the current 
                    '		profile manager, add the athlete to the comparison list
                    '		and the athlete comparison grid
                    If athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, index1).Value = athleteCompare(index) _
                        And athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index1).Value = currentProfileManagerId Then
                        comparisonListGrid.Rows.Add()
                        comparisonListGrid.Item(comparisonListEntityProfileIdCol.Index, comparisonListGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, index1).Value
                        comparisonListGrid.Item(comparisonListEntityNameCol.Index, comparisonListGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = (athleteAthleteGrid.Item(athleteLastNameCol.Index, index1).Value & ", " & athleteAthleteGrid.Item(athleteFirstNameCol.Index, index1).Value)

                        comparisonAthleteGrid.Rows.Add()
                        comparisonAthleteGrid.Item(comparisonAthleteCompareAthleteProfileIdCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteAthleteProfileIdCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareFirstNameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteFirstNameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareMiddleInitialCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteMiddleInitialCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareLastNameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteLastNameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareNicknameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteNicknameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteComparePictureCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athletePictureCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareClassRankCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteClassRankCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareNotesCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteNotesCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareTeamNameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteTeamNameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareAthleteNumberCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteComparePtsPerGameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athletePtsPerGameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareAssistsPerGameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareReboundsPerGameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareMinPerGameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareStealsPerGameCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareFTPercentageCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareTextColorCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteTextColorCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareProfileManagerIdCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteProfileManagerIdCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareDateCreatedCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteDateCreatedCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareDateUpdatedCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteDateUpdatedCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareUserCreatedCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteUserCreatedCol.Index, index1).Value
                        comparisonAthleteGrid.Item(comparisonAthleteCompareUserUpdatedCol.Index, (comparisonAthleteGrid.Rows.Count - 1)).Value = athleteAthleteGrid.Item(athleteUserUpdatedCol.Index, index1).Value
                    End If

                Next

            Next

            'If comparing teams
        ElseIf comparisonTeamRadiobtn.Checked Then

            'Get the number of teams to compare
            compareListLen = teamCompare.Length - 1

            'Get the total number of teams
            entityListLen = teamTeamGrid.Rows.Count - 1

            'For each team in the compare list, loop through all the teams
            For index As Integer = 0 To compareListLen

                For index1 As Integer = 0 To entityListLen

                    'If the overall athlete is the same as the athlete in the
                    '		compare list and is associated with the current profile
                    '		manager, then add the team to the compare list and the
                    '		team comparison grid
                    If teamTeamGrid.Item(teamProfileIdCol.Index, index1).Value = teamCompare(index) _
                        And teamTeamGrid.Item(teamProfileManagerIdCol.Index, index1).Value = currentProfileManagerId Then
                        comparisonListGrid.Rows.Add()
                        comparisonListGrid.Item(comparisonListEntityProfileIdCol.Index, comparisonListGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamProfileIdCol.Index, index1).Value
                        comparisonListGrid.Item(comparisonListEntityNameCol.Index, comparisonListGrid.Rows.GetLastRow(DataGridViewElementStates.None)).Value = teamTeamGrid.Item(teamTeamNameCol.Index, index1).Value

                        comparisonTeamGrid.Rows.Add()
                        comparisonTeamGrid.Item(comparisonTeamCompareTeamProfileIdCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamProfileIdCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareTeamNameCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamTeamNameCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareTeamPictureCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamPictureCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareSchoolNameCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamSchoolNameCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareConferenceCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamConferenceCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareCheerCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamCheerCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareNotesCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamNotesCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareWinsCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamWinsCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareLossesCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamLossesCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareWinLossScoreDiffCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareESPNRankingCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamESPNRankingCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareRPICol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamRPICol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareTextColorCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamTextColorCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareProfileManagerIdCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamProfileManagerIdCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareDateCreatedCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamDateCreatedCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareDateUpdatedCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamDateUpdatedCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareUserCreatedCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamUserCreatedCol.Index, index1).Value
                        comparisonTeamGrid.Item(comparisonTeamCompareUserUpdatedCol.Index, (comparisonTeamGrid.Rows.Count - 1)).Value = teamTeamGrid.Item(teamUserUpdatedCol.Index, index1).Value
                    End If

                Next

            Next
        End If

        'Update the comparison buttons
        updateComparisonButtons()

        'Highlight the high and low statistics
        highlightCompare()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Comparisons
    'Task(s): 4.1.1 Delete Team from Comparison, 
    '		4.1.2 Clear all teams from Comparison,
    '		4.2.1 Delete Athlete from Comparison,
    '		4.2.2 Clear All Athletes from Comparison
    'Pre-Condition: Comparison buttons exist.
    'Post-Condition: Comparison buttons are in the correct state.
    'Functionality: Updates the state of the comparison buttons depending on
    '		what data is in the comparison list datagrid.
    Private Sub updateComparisonButtons()

        'Get the number of entities in the comparison list
        Dim numEnities As Integer = comparisonListGrid.Rows.Count

        'A flag of whether any of the entities are checked
        Dim listHasChecks As Boolean = False

        'If there are entities in the list, enable the clear button
        If numEnities > 0 Then
            comparisonClearListBtn.Enabled = True
            'Otherwise, disable the clear and delete button
        Else
            comparisonClearListBtn.Enabled = False
            comparisonRemoveBtn.Enabled = False
        End If

        numEnities = numEnities - 1

        'Loop through all the entities in the list
        For index As Integer = 0 To numEnities
            'Update the listHasChecks variable
            listHasChecks = listHasChecks Or comparisonListGrid.Item(comparisonListCheckboxCol.Index, index).Value

            'If listHasChecks is ever true, exit the loop
            If listHasChecks Then
                index = numEnities
            End If

        Next

        'If the list has checks, enable the delete button
        If listHasChecks Then
            comparisonRemoveBtn.Enabled = True
            'Otherwise, disable it
        Else
            comparisonRemoveBtn.Enabled = False
        End If

    End Sub


    'Developer Name: David Logsdon
    'Module Name: Comparisons
    'Task(s): 4. Comparisons, 4.1 Team Comparison,
    '		4.1.1 Delete Team from Comparison, 4.1.3 Compare All Selected Teams,
    '		4.2 Athlete Comparison, 4.2.1 Delete Athlete from Comparison,
    '		4.2.3 Compare All Selected Athletes
    'Pre-Condition: The athlete comparison datagrid and team comparison datagrid are
    '		loaded with data.
    'Post-Condition: the high and low values for each column are highlighted red or green
    '       depending on if it is the highest or lowest value in the column.
    'Functionality: This function goes through each column with numerical statistical data
    '       then each row to determine and highlight the highest and lowest statistics.
    Private Sub highlightCompare()

        Dim curColumn As Integer
        Dim numColumns As Integer
        Dim numRows As Integer
        Dim highRow As Integer = 0
        Dim highIndeces() As Integer = New Integer() {0}
        Dim lowRow As Integer = 0
        Dim lowIndeces() As Integer = New Integer() {0}
        Const ACCEPTABLE_DIFFERENCE As Double = 0.0001

        'Decide wheter the Athlete radio button or the Team radio button is checked
        If comparisonAthleteRadiobtn.Checked And comparisonAthleteGrid.RowCount > 1 Then

            numColumns = athleteAthleteGrid.Columns.Count
            numRows = comparisonAthleteGrid.Rows.Count

            'For each column that has numerical statistic data, find the highest and lowest values
            For curColumn = 0 To numColumns - 1

                'Just do the comparison for the following columns
                If curColumn = comparisonAthleteComparePtsPerGameCol.Index _
                    Or curColumn = comparisonAthleteCompareAssistsPerGameCol.Index _
                    Or curColumn = comparisonAthleteCompareReboundsPerGameCol.Index _
                    Or curColumn = comparisonAthleteCompareMinPerGameCol.Index _
                    Or curColumn = comparisonAthleteCompareStealsPerGameCol.Index _
                    Or curColumn = comparisonAthleteCompareFTPercentageCol.Index _
                Then

                    'First reset the color of each row
                    For curRow = 0 To numRows - 1

                        comparisonAthleteGrid.Item(curColumn, curRow).Style.BackColor = Color.White
                        comparisonAthleteGrid.Item(curColumn, curRow).Style.ForeColor = Color.Black

                    Next

                    'For each row in the grid, find the highest and lowest values for this column
                    For curRow = 0 To numRows - 1

                        If (comparisonAthleteGrid.Item(curColumn, curRow).Value - comparisonAthleteGrid.Item(curColumn, highRow).Value) > 0 Then
                            highRow = curRow
                            highIndeces = New Integer() {curRow}
                        ElseIf Math.Abs(comparisonAthleteGrid.Item(curColumn, curRow).Value - comparisonAthleteGrid.Item(curColumn, highRow).Value) < ACCEPTABLE_DIFFERENCE Then
                            ReDim Preserve highIndeces(highIndeces.Count)
                            highIndeces(highIndeces.Count - 1) = curRow
                        End If

                        If (comparisonAthleteGrid.Item(curColumn, curRow).Value - comparisonAthleteGrid.Item(curColumn, lowRow).Value) < 0 Then
                            lowRow = curRow
                            lowIndeces = New Integer() {curRow}
                        ElseIf Math.Abs(comparisonAthleteGrid.Item(curColumn, curRow).Value - comparisonAthleteGrid.Item(curColumn, lowRow).Value) < ACCEPTABLE_DIFFERENCE Then
                            ReDim lowIndeces(lowIndeces.Count)
                            lowIndeces(lowIndeces.Count - 1) = curRow
                        End If

                    Next

                    'Change the cell's background color to green or red accordingly
                    For Each index As Integer In lowIndeces
                        comparisonAthleteGrid.Item(curColumn, index).Style.BackColor = Color.Red
                        comparisonAthleteGrid.Item(curColumn, index).Style.ForeColor = Color.White
                    Next

                    For Each index As Integer In highIndeces
                        comparisonAthleteGrid.Item(curColumn, index).Style.BackColor = Color.Green
                        comparisonAthleteGrid.Item(curColumn, index).Style.ForeColor = Color.White
                    Next

                    'Reset the high and low rows for the next pass
                    highRow = 0
                    highIndeces = New Integer() {0}
                    lowRow = 0
                    lowIndeces = New Integer() {0}
                End If

            Next

        ElseIf comparisonTeamRadiobtn.Checked And comparisonTeamGrid.RowCount > 1 Then

            numColumns = teamTeamGrid.Columns.Count
            numRows = comparisonTeamGrid.Rows.Count

            'For each column that has numerical statistic data, find the highest and lowest values
            For curColumn = 0 To numColumns - 1

                'Just do the comparison for the following columns
                If curColumn = comparisonTeamCompareWinsCol.Index _
                    Or curColumn = comparisonTeamCompareWinLossScoreDiffCol.Index _
                    Or curColumn = comparisonTeamCompareRPICol.Index _
                    Or curColumn = comparisonTeamCompareLossesCol.Index _
                    Or curColumn = comparisonTeamCompareESPNRankingCol.Index _
                Then

                    'First reset the color of each row
                    For curRow = 0 To numRows - 1

                        comparisonTeamGrid.Item(curColumn, curRow).Style.BackColor = Color.White
                        comparisonTeamGrid.Item(curColumn, curRow).Style.ForeColor = Color.Black

                    Next

                    'For each row in the grid, find the highest and lowest values for this column
                    For curRow = 0 To numRows - 1

                        If (comparisonTeamGrid.Item(curColumn, curRow).Value - comparisonTeamGrid.Item(curColumn, highRow).Value) > 0 Then
                            highRow = curRow
                            highIndeces = New Integer() {curRow}
                        ElseIf Math.Abs(comparisonTeamGrid.Item(curColumn, curRow).Value - comparisonTeamGrid.Item(curColumn, highRow).Value) < ACCEPTABLE_DIFFERENCE Then
                            ReDim Preserve highIndeces(highIndeces.Count)
                            highIndeces(highIndeces.Count - 1) = curRow
                        End If

                        If (comparisonTeamGrid.Item(curColumn, curRow).Value - comparisonTeamGrid.Item(curColumn, lowRow).Value) < 0 Then
                            lowRow = curRow
                            lowIndeces = New Integer() {curRow}
                        ElseIf (comparisonTeamGrid.Item(curColumn, curRow).Value - comparisonTeamGrid.Item(curColumn, lowRow).Value) < ACCEPTABLE_DIFFERENCE Then
                            ReDim Preserve lowIndeces(lowIndeces.Count)
                            lowIndeces(lowIndeces.Count - 1) = curRow
                        End If

                    Next

                    'Changed their color to green or red accordingly
                    'Hightest number is best
                    If curColumn = comparisonTeamCompareWinsCol.Index _
                        Or curColumn = comparisonTeamCompareWinLossScoreDiffCol.Index _
                        Or curColumn = comparisonTeamCompareRPICol.Index _
                    Then

                        For Each index As Integer In lowIndeces
                            comparisonTeamGrid.Item(curColumn, index).Style.BackColor = Color.Red
                            comparisonTeamGrid.Item(curColumn, index).Style.ForeColor = Color.White
                        Next

                        For Each index As Integer In highIndeces
                            comparisonTeamGrid.Item(curColumn, index).Style.BackColor = Color.Green
                            comparisonTeamGrid.Item(curColumn, index).Style.ForeColor = Color.White
                        Next

                    End If

                    'Lowest number is best
                    If curColumn = comparisonTeamCompareLossesCol.Index _
                        Or curColumn = comparisonTeamCompareESPNRankingCol.Index _
                    Then

                        For Each index As Integer In highIndeces
                            comparisonTeamGrid.Item(curColumn, index).Style.BackColor = Color.Red
                            comparisonTeamGrid.Item(curColumn, index).Style.ForeColor = Color.White
                        Next

                        For Each index As Integer In lowIndeces
                            comparisonTeamGrid.Item(curColumn, index).Style.BackColor = Color.Green
                            comparisonTeamGrid.Item(curColumn, index).Style.ForeColor = Color.White
                        Next

                    End If

                    'Reset the high and low rows for the next pass
                    highRow = 0
                    highIndeces = New Integer() {0}
                    lowRow = 0
                    lowIndeces = New Integer() {0}

                End If

            Next

        End If
    End Sub

    'Public Functions

    'Developer Name: Jason Lyle
    'Module Name: Mouse Control
    'Task(s): N/A
    'Pre-Condition: None
    'Post-Condition: If alsoUp is true, then a mouse left button down and mouse
    '		up are added into the clickstream.  If alsoUp is false, then just a
    '		mouse left button down is added into the clickstream.
    'Functionality: Simulate a mouse click.
    Public Sub keyMouseDown(ByVal alsoUp As Boolean)

        'Create an intput type object
        Dim inputEvents(0) As INPUT_TYPE

        'Set the members for a left mouse button down event.
        inputEvents(0).xi.dx = 0
        inputEvents(0).xi.dy = 0
        inputEvents(0).xi.mouseData = 0
        inputEvents(0).xi.dwFlags = MOUSE_LEFTDOWN
        inputEvents(0).xi.dwtime = 0
        inputEvents(0).xi.dwExtraInfo = 0
        inputEvents(0).dwType = INPUT_MOUSE

        'Insert the event into the clickstream
        SendInput(1, inputEvents(0), Len(inputEvents(0)))

        'If the flag alsoUp is true, also send a left mouse button up event.
        If alsoUp Then
            keyMouseUp()
        End If
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Mouse control
    'Task(s): N/A
    'Pre-Condition: None
    'Post-Condition: A mouse left button up is added to the clickstream.
    'Functionality: Simulate a mouse button coming up.
    Public Sub keyMouseUp()

        'Create an intput type object
        Dim inputEvents(0) As INPUT_TYPE

        'Set the members for a left mouse button up event.
        inputEvents(0).xi.dx = 0
        inputEvents(0).xi.dy = 0
        inputEvents(0).xi.mouseData = 0
        inputEvents(0).xi.dwFlags = MOUSE_LEFTUP
        inputEvents(0).xi.dwtime = 0
        inputEvents(0).xi.dwExtraInfo = 0
        inputEvents(0).dwType = INPUT_MOUSE

        'Insert the event into the clickstream
        SendInput(1, inputEvents(0), Len(inputEvents(0)))
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Mouse control
    'Task(s): N/A
    'Pre-Condition: The cursor exists on screen.
    'Post-Condition: The cursor moves from its starting location by x and
    '		y pixels.
    'Functionality: Simulate mouse movement.
    Public Sub keyMouseMove(ByVal x As Integer, ByVal y As Integer)

        'Create an intput type object
        Dim inputEvents(0) As INPUT_TYPE

        'Set the members for a left mouse movement event.
        inputEvents(0).xi.dx = x
        inputEvents(0).xi.dy = y
        inputEvents(0).xi.mouseData = 0
        inputEvents(0).xi.dwFlags = MOUSE_MOVE
        inputEvents(0).xi.dwtime = 0
        inputEvents(0).xi.dwExtraInfo = 0
        inputEvents(0).dwType = INPUT_MOUSE

        'Insert the event into the clickstream
        SendInput(1, inputEvents(0), Len(inputEvents(0)))
    End Sub
    'Context Menu Functions

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager
    'Task(s): 1.3 Preserve Changes
    'Pre-Condition: Changes have been made to the profile manager.
    'Post-Condition: Changes have been saved.
    'Functionality: Save changes made to a profile manager.
    Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
        'To be implemented at a later date
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Profile Manager
    'Task(s): 1.7 Exit Profile Manager
    'Pre-Condition: The program is open.
    'Post-Condition: The program is closed.
    'Functionality: Close the program
    Private Sub ExitMenuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitMenuToolStripMenuItem.Click
        Me.Close()
    End Sub


    'Database Functions

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: The computer is connected to the internet.
    'Post-Condition: An open connection to an oracle database is returned.
    'Functionality: Return an open oracle connection.
    Function openOracleConnection() As OracleConnection
        'The hostname of the database
        Dim hostName As String = "profilemanager.no-ip.org:1521"

        'The userID to connect to the database with
        Dim userID As String = "PROFILEMANAGER"

        'The password fot the given userID
        Dim password As String = "cs324"

        'Create an oracle connection using the above information
        Dim myConnect As OracleConnection = New OracleConnection("Server=" + hostName + ";Uid=" + userID + ";Pwd=" + password)

        'Open the connection
        myConnect.Open()

        'Return the connection object
        Return myConnect
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: Connected to the internet
    'Post-Condition: Data is retrieved from the database and loaded into the
    '		toPopulate datagrid
    'Functionality: Execute query on the database and load the results
    '		into toPopulate
    Sub getData(ByVal query As String, ByRef toPopulate As DataGridView)
        'Get an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'create a place to store results of the query
        Dim results As OracleDataReader

        'Clear out the given datagrid
        toPopulate.Rows.Clear()

        'SEt up the command object
        command.Connection = connection
        command.CommandType = CommandType.Text
        command.CommandText = query

        'Execute the command and store the results in results
        results = command.ExecuteReader()

        'while there are resutsl to read
        While results.Read()

            'add a row to the datagrid
            toPopulate.Rows.Add()
            'For each 
            For index As Integer = 0 To toPopulate.Columns.Count - 1
                'store the results of the query in the datagrid
                toPopulate.Item(index, toPopulate.Rows.GetLastRow(DataGridViewElementStates.None)).Value = results(index).ToString()
            Next

        End While

        'close the connection
        connection.Close()

        'Update the datagrid
        toPopulate.Refresh()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: None
    'Post-Condition: The program knows whether or not there are outstanding 
    '		changesfor the given profile manager.
    'Functionality: Find out if there are outstanding changes for a given
    '		profile manager.
    Function checkOutstandingChanges(ByVal profileManagerId As String) As Boolean

        'Get an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Set up the parameters for the stored procedure
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)
        Dim changesParm As OracleParameter = New OracleParameter("r_changes", OracleType.Number)

        'Set up the oracle command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.check_outstanding_changes"

        'Set up the parameters for the command
        profileManagerIdParm.Direction = ParameterDirection.Input
        profileManagerIdParm.Value = profileManagerId

        changesParm.Direction = ParameterDirection.Output

        'Add the parameters to the command
        command.Parameters.Add(profileManagerIdParm)
        command.Parameters.Add(changesParm)

        'Execute the stored procedure
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()

        'Return the returned result of the stored procedure
        Return changesParm.Value
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 1.3 Preserve Changes
    'Pre-Condition: Unsaved changes.
    'Post-Condition: All changes are saved for the active profile manager.
    'Functionality: Save all the changes made in the profile manager back to
    '		the database.
    Sub saveChanges(ByVal profileManagerId As String)

        'Create an oracle connection object
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command object
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the oracle command
        Dim profileManagerIDParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)

        'set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.save_changes"

        'set up the parameters
        profileManagerIDParm.Direction = ParameterDirection.Input
        profileManagerIDParm.Value = profileManagerId

        'add the parameters to the command
        command.Parameters.Add(profileManagerIDParm)

        'execute the stored procedure
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: Unsaved changes.
    'Post-Condition: All changes made to the profile manager since opening
    '		or the last save are discarded.
    'Functionality: Discard all changes to the database since the profile
    '		manager was last opened or saved.
    Sub discardChanges(ByVal profileManagerId As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored procedure
        Dim profileManagerIDParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)

        'set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.discard_changes"

        'Set up the parameter
        profileManagerIDParm.Direction = ParameterDirection.Input
        profileManagerIDParm.Value = profileManagerId

        'Add the parameter to the command
        command.Parameters.Add(profileManagerIDParm)

        'Execute the command
        command.ExecuteNonQuery()

        'close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 1. Manage Profile Managers, 1.1 Create New Profile Manager
    'Pre-Condition: None
    'Post-Condition: A new profile manager is created.
    'Functionality: Create a new profile manager.
    Function createProfileManager(ByVal filename As String) As String

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim filenameParm As OracleParameter = New OracleParameter("p_file_name", OracleType.VarChar)
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("r_profile_manager_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Profile_Manager_INS"

        'Set up the oracle parameters
        filenameParm.Direction = ParameterDirection.Input
        filenameParm.Value = filename

        profileManagerIdParm.Direction = ParameterDirection.Output
        profileManagerIdParm.Size = 32

        'Add the parameters to the command
        command.Parameters.Add(filenameParm)
        command.Parameters.Add(profileManagerIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()

        'Return the return value of the stored procedure
        Return profileManagerIdParm.Value
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: There are existing profile managers.
    'Post-Condition: the selected profile manager is updated.
    'Functionality: Rename the profile manager file.
    Function updateProfileManager(ByVal profileManagerId As String, ByVal filename As String) As Boolean

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)
        Dim filenameParm As OracleParameter = New OracleParameter("p_file_name", OracleType.VarChar)
        Dim workedParm As OracleParameter = New OracleParameter("r_worked", OracleType.Number)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Profile_Manager_UPD"

        'Set up the oracle parameters
        profileManagerIdParm.Direction = ParameterDirection.Input
        profileManagerIdParm.Value = profileManagerId

        filenameParm.Direction = ParameterDirection.Input
        filenameParm.Value = filename

        workedParm.Direction = ParameterDirection.Output

        'Add the parameters to the command
        command.Parameters.Add(profileManagerIdParm)
        command.Parameters.Add(filenameParm)
        command.Parameters.Add(workedParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()

        'Return the return value of the stored procedure
        Return workedParm.Value
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: There is a profile manager to delete.
    'Post-Condition: The profile manager is deleted.
    'Functionality: Delete a profile manager.
    Sub deleteProfileManager(ByRef profileManagerId As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Profile_Manager_DEL"

        'Set up the oracle parameters
        profileManagerIdParm.Direction = ParameterDirection.Input
        profileManagerIdParm.Value = profileManagerId

        'Add the parameters to the command
        command.Parameters.Add(profileManagerIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 3. Managte Athlete Profile, 3.1 Add Athlete Profile,
    '		3.1.1 Add Athlete Name, 3.1.1.1 Add Athlete First Name,
    '		3.1.1.2 Add Athlete Last Name, 3.1.1.3 Add Athlete Middle Initial,
    '		3.1.1.4 Add Athlete Nickname, 3.1.2 Add Athlete Notes,
    '		3.1.3 Add Athlete Number,
    '		3.1.5 Add Athlete Statistics, 3.1.5.1 Add Athlete Points per Game,
    '		3.1.5.2 Add Athlete Assists per Game,
    '		3.1.5.3 Add Athlete Rebounds per Game,
    '		3.1.5.4 Add Athlete Minutes per Game,
    '		3.1.5.5 Add Athlete Steals per Game,
    '		3.1.5.6 Add Athlete Free Throw Percentage,
    '		3.1.6 Add Athlete Class Rank, 3.1.7 Date Added to System
    'Pre-Condition: There is a profile manager active for which the athlete can
    '		be associated with.
    'Post-Condition: A new athlete is added.
    'Functionality: Add a new athlete.
    Function createAthleteProfile( _
        ByVal firstName As String, _
        ByVal middleInitial As Char(), _
        ByVal lastName As String, _
        ByVal nickname As String, _
        ByVal classRank As String, _
        ByVal notes As String, _
        ByVal pointsPerGame As Double, _
        ByVal assistsPerGame As Double, _
        ByVal reboundsPerGame As Double, _
        ByVal minutesPerGame As Double, _
        ByVal stealsPerGame As Double, _
        ByVal freethrowPercentage As Double, _
        ByVal textColor As String, _
        ByVal profileManagerId As String) As String


        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim athleteProfifleIdParm As OracleParameter = New OracleParameter("p_athlete_profile_id", OracleType.VarChar)
        Dim firstNameParm As OracleParameter = New OracleParameter("p_first_name", OracleType.VarChar)
        Dim middleInitialParm As OracleParameter = New OracleParameter("p_middle_initial", OracleType.Char)
        Dim lastNameParm As OracleParameter = New OracleParameter("p_last_name", OracleType.VarChar)
        Dim nicknameParm As OracleParameter = New OracleParameter("p_nickname", OracleType.VarChar)
        Dim classRankParm As OracleParameter = New OracleParameter("p_class_rank", OracleType.Char)
        Dim notesParm As OracleParameter = New OracleParameter("p_notes", OracleType.VarChar)
        Dim pointsPerGameParm As OracleParameter = New OracleParameter("p_points_per_game", OracleType.Number)
        Dim assistsPerGameParm As OracleParameter = New OracleParameter("p_assists_per_game", OracleType.Number)
        Dim reboundsPerGameParm As OracleParameter = New OracleParameter("p_rebounds_per_game", OracleType.Number)
        Dim minutesPerGameParm As OracleParameter = New OracleParameter("p_mins_per_game", OracleType.Number)
        Dim stealsPerGameParm As OracleParameter = New OracleParameter("p_steals_per_game", OracleType.Number)
        Dim freethrowPercentageParm As OracleParameter = New OracleParameter("p_free_throw_percentage", OracleType.Number)
        Dim textColorParm As OracleParameter = New OracleParameter("p_text_color", OracleType.VarChar)
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Athlete_Prof_Working_INSUPD"

        'Set up the oracle parameters
        athleteProfifleIdParm.Direction = ParameterDirection.InputOutput
        athleteProfifleIdParm.Value = ""
        athleteProfifleIdParm.Size = 32

        firstNameParm.Direction = ParameterDirection.Input
        firstNameParm.Value = firstName

        middleInitialParm.Direction = ParameterDirection.Input
        middleInitialParm.Value = middleInitial

        lastNameParm.Direction = ParameterDirection.Input
        lastNameParm.Value = lastName

        nicknameParm.Direction = ParameterDirection.Input
        nicknameParm.Value = nickname

        classRankParm.Direction = ParameterDirection.Input
        classRankParm.Value = classRank

        notesParm.Direction = ParameterDirection.Input
        notesParm.Value = notes

        pointsPerGameParm.Direction = ParameterDirection.Input
        pointsPerGameParm.Value = pointsPerGame

        assistsPerGameParm.Direction = ParameterDirection.Input
        assistsPerGameParm.Value = assistsPerGame

        reboundsPerGameParm.Direction = ParameterDirection.Input
        reboundsPerGameParm.Value = reboundsPerGame

        minutesPerGameParm.Direction = ParameterDirection.Input
        minutesPerGameParm.Value = minutesPerGame

        stealsPerGameParm.Direction = ParameterDirection.Input
        stealsPerGameParm.Value = stealsPerGame

        freethrowPercentageParm.Direction = ParameterDirection.Input
        freethrowPercentageParm.Value = freethrowPercentage

        textColorParm.Direction = ParameterDirection.Input
        textColorParm.Value = textColor

        profileManagerIdParm.Direction = ParameterDirection.Input
        profileManagerIdParm.Value = profileManagerId

        'Add the parameters to the command
        command.Parameters.Add(athleteProfifleIdParm)
        command.Parameters.Add(firstNameParm)
        command.Parameters.Add(middleInitialParm)
        command.Parameters.Add(lastNameParm)
        command.Parameters.Add(nicknameParm)
        command.Parameters.Add(classRankParm)
        command.Parameters.Add(notesParm)
        command.Parameters.Add(pointsPerGameParm)
        command.Parameters.Add(assistsPerGameParm)
        command.Parameters.Add(reboundsPerGameParm)
        command.Parameters.Add(minutesPerGameParm)
        command.Parameters.Add(stealsPerGameParm)
        command.Parameters.Add(freethrowPercentageParm)
        command.Parameters.Add(textColorParm)
        command.Parameters.Add(profileManagerIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()

        'Return the return value of the stored procedure
        Return athleteProfifleIdParm.Value
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 3. Manage Athlete Profile, 3.2 Edit Athlete Profile,
    '		3.2.1 Edit Athlete Name, 3.2.1.1 Edit Athlete First Name,
    '		3.2.1.2 Edit Athlete Last Name, 3.2.1.3 Edit Athlete Middle Initial,
    '		3.2.1.4 Edit Athlet Nickname, 3.2.2 Edit Athlete Notes,
    '		3.2.3 Edit Athlete Number, 3.2.5 Edit Athlete Statistics,
    '		3.2.5.1 Edit Athlete Points per Game,
    '		3.2.5.2 Edit Athlete Assists per Game,
    '		3.2.5.3 Edit Athlete Rbounds per Game,
    '		3.2.5.4 Edit Athlete Minutes per Game,
    '		3.2.5.5 Edit Athlete Steals per Game,
    '		3.2.5.6 Edit Athlete Free Throw Percentage,
    '		3.2.6 Edit Athlete Class Rank
    'Pre-Condition: There is an athlete profile for which to edit.
    'Post-Condition: The athlete profile is updated.
    'Functionality: Update an athlete profile.
    Sub updateAthleteProfile( _
        ByVal athleteProfileId As String, _
        ByVal firstName As String, _
        ByVal middleInitial As Char(), _
        ByVal lastName As String, _
        ByVal nickname As String, _
        ByVal classRank As String, _
        ByVal notes As String, _
        ByVal pointsPerGame As Double, _
        ByVal assistsPerGame As Double, _
        ByVal reboundsPerGame As Double, _
        ByVal minutesPerGame As Double, _
        ByVal stealsPerGame As Double, _
        ByVal freethrowPercentage As Double, _
        ByVal textColor As String, _
        ByVal profileManagerId As String)


        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim athleteProfifleIdParm As OracleParameter = New OracleParameter("p_athlete_profile_id", OracleType.VarChar)
        Dim firstNameParm As OracleParameter = New OracleParameter("p_first_name", OracleType.VarChar)
        Dim middleInitialParm As OracleParameter = New OracleParameter("p_middle_initial", OracleType.Char)
        Dim lastNameParm As OracleParameter = New OracleParameter("p_last_name", OracleType.VarChar)
        Dim nicknameParm As OracleParameter = New OracleParameter("p_nickname", OracleType.VarChar)
        Dim classRankParm As OracleParameter = New OracleParameter("p_class_rank", OracleType.Char)
        Dim notesParm As OracleParameter = New OracleParameter("p_notes", OracleType.VarChar)
        Dim pointsPerGameParm As OracleParameter = New OracleParameter("p_points_per_game", OracleType.Number)
        Dim assistsPerGameParm As OracleParameter = New OracleParameter("p_assists_per_game", OracleType.Number)
        Dim reboundsPerGameParm As OracleParameter = New OracleParameter("p_rebounds_per_game", OracleType.Number)
        Dim minutesPerGameParm As OracleParameter = New OracleParameter("p_mins_per_game", OracleType.Number)
        Dim stealsPerGameParm As OracleParameter = New OracleParameter("p_steals_per_game", OracleType.Number)
        Dim freethrowPercentageParm As OracleParameter = New OracleParameter("p_free_throw_percentage", OracleType.Number)
        Dim textColorParm As OracleParameter = New OracleParameter("p_text_color", OracleType.VarChar)
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Athlete_Prof_Working_INSUPD"

        'Set up the oracle parameters
        athleteProfifleIdParm.Direction = ParameterDirection.InputOutput
        athleteProfifleIdParm.Value = athleteProfileId
        athleteProfifleIdParm.Size = 32

        firstNameParm.Direction = ParameterDirection.Input
        firstNameParm.Value = firstName

        middleInitialParm.Direction = ParameterDirection.Input
        middleInitialParm.Value = middleInitial

        lastNameParm.Direction = ParameterDirection.Input
        lastNameParm.Value = lastName

        nicknameParm.Direction = ParameterDirection.Input
        nicknameParm.Value = nickname

        classRankParm.Direction = ParameterDirection.Input
        classRankParm.Value = classRank

        notesParm.Direction = ParameterDirection.Input
        notesParm.Value = notes

        pointsPerGameParm.Direction = ParameterDirection.Input
        pointsPerGameParm.Value = pointsPerGame

        assistsPerGameParm.Direction = ParameterDirection.Input
        assistsPerGameParm.Value = assistsPerGame

        reboundsPerGameParm.Direction = ParameterDirection.Input
        reboundsPerGameParm.Value = reboundsPerGame

        minutesPerGameParm.Direction = ParameterDirection.Input
        minutesPerGameParm.Value = minutesPerGame

        stealsPerGameParm.Direction = ParameterDirection.Input
        stealsPerGameParm.Value = stealsPerGame

        freethrowPercentageParm.Direction = ParameterDirection.Input
        freethrowPercentageParm.Value = freethrowPercentage

        textColorParm.Direction = ParameterDirection.Input
        textColorParm.Value = textColor

        profileManagerIdParm.Direction = ParameterDirection.Input
        profileManagerIdParm.Value = profileManagerId

        'Add the parameters to the command
        command.Parameters.Add(athleteProfifleIdParm)
        command.Parameters.Add(firstNameParm)
        command.Parameters.Add(middleInitialParm)
        command.Parameters.Add(lastNameParm)
        command.Parameters.Add(nicknameParm)
        command.Parameters.Add(classRankParm)
        command.Parameters.Add(notesParm)
        command.Parameters.Add(pointsPerGameParm)
        command.Parameters.Add(assistsPerGameParm)
        command.Parameters.Add(reboundsPerGameParm)
        command.Parameters.Add(minutesPerGameParm)
        command.Parameters.Add(stealsPerGameParm)
        command.Parameters.Add(freethrowPercentageParm)
        command.Parameters.Add(textColorParm)
        command.Parameters.Add(profileManagerIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 3. Manage Athlete Profile, 3.3 Delete Athlete Profile,
    '		3.3.1 Delete Athlete Name, 3.3.1.1 Delete Athlete First Name,
    '		3.3.1.2 Delete Athlete Last Name, 3.3.1.3 Delete Athlete Middle Initial,
    '		3.3.1.4 Delete Athlete Nickname, 3.3.2 Delete Athlete Notes,
    '		3.3.3 Delete Athlete Number, 3.3.4 Delete Athlete Picture,
    '		3.3.5 Delete Athlete Statistics, 3.3.5.1 Delete Athlete Points per Game,
    '		3.3.5.2 Delete Athlete Assists per Game,
    '		3.3.5.3 Delete Athlete Rebounds per Game,
    '		3.3.5.4 Delete Athlete Minutes per Game,
    '		3.3.5.5 Delete Athlete Steals per Game,
    '		3.3.5.6 Delete Athlete Free Throw Percentage,
    '		3.3.6 Delete Athlete Class Rank
    'Pre-Condition: There is an athlete profile that exists for which to delete.
    'Post-Condition: The athlete profile is deleted.
    'Functionality: Delete an athlete profile.
    Sub deleteAthleteProfile(ByVal athleteProfileId As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim athleteProfileIdParm As OracleParameter = New OracleParameter("p_athlete_profile_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Athlete_Profile_DEL"

        'Set up the oracle parameters
        athleteProfileIdParm.Direction = ParameterDirection.Input
        athleteProfileIdParm.Value = athleteProfileId

        'Add the parameters to the command
        command.Parameters.Add(athleteProfileIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 3.1.4 Add Athlete Picture
    'Pre-Condition: There is an athlete for which to add a picture to.
    'Post-Condition: The athlete has a pictue with his information.
    'Functionality: Add a photo to an athlete profile.
    Sub addAthletePhoto(ByVal athleteProfileId As String, ByVal filepath As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim athleteProfileIdParm As OracleParameter = New OracleParameter("p_athlete_profile_id", OracleType.VarChar)
        Dim pictureParm As OracleParameter = New OracleParameter("p_picture", OracleType.Blob)
        Dim myBytes As Byte()

        myBytes = My.Computer.FileSystem.ReadAllBytes(filepath)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Add_Athlete_Photo"

        'Set up the oracle parameters
        athleteProfileIdParm.Direction = ParameterDirection.Input
        athleteProfileIdParm.Value = athleteProfileId

        pictureParm.Direction = ParameterDirection.Input
        pictureParm.Value = myBytes

        'Add the parameters to the command
        command.Parameters.Add(athleteProfileIdParm)
        command.Parameters.Add(pictureParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: There is an athlete to get the photo from
    'Post-Condition: An image is returned that is the picture for the athlete.
    'Functionality: Get the athlete's photo.
    Function getAthletePhoto(ByVal athleteProfileId As String) As Image

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim athleteProfileIdParm As OracleParameter = New OracleParameter("p_athlete_profile_id", OracleType.VarChar)
        Dim pictureParm As OracleParameter = New OracleParameter("r_picture", OracleType.Blob)

        'Variables for changing the Binary Large Object (BLOB) from the database
        '		into the stored image
        Dim MyBytes() As Byte
        Dim myStream As System.IO.MemoryStream
        Dim myPic As Image

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Get_Athlete_Photo"

        'Set up the oracle parameters
        athleteProfileIdParm.Direction = ParameterDirection.Input
        athleteProfileIdParm.Value = athleteProfileId

        pictureParm.Direction = ParameterDirection.Output

        'Add the parameters to the command
        command.Parameters.Add(athleteProfileIdParm)
        command.Parameters.Add(pictureParm)

        'Execute the command
        command.ExecuteNonQuery()

        'If the picture parameters return value is not null then read the
        '		image into a byte array, then loading the byte array into
        '		a memory stream, then creating a file from the memory stream
        If Not pictureParm.Value.Equals(System.DBNull.Value) Then
            ReDim MyBytes(pictureParm.Value.Length)
            pictureParm.Value.Read(MyBytes, 0, pictureParm.Value.Length)
            'Close the connection
            connection.Close()

            myStream = New System.IO.MemoryStream(MyBytes)
            myPic = Image.FromStream(myStream, True)
            'If the picture's return value is null, set the image value to the no
            '		image stored in the application
        Else
            myPic = My.Resources.noImage
        End If

        'Return the image
        Return myPic
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 2. Manage Team Profile, 2.3 Delete Team Profile,
    '		2.3.1 Delete Team Name, 2.3.2 Delete Team Notes,
    '		2.3.3 Delete Team Cheer, 2.3.4 Delete Team Conference,
    '		2.3.5 Delete Team Picture, 2.3.6 Delete Team Statistics,
    '		2.3.6.1 Delete Team Wins, 2.3.6.2 Delete Team Losses,
    '		2.3.6.3 Delete Team Win Percentage,
    '		2.3.6.4 Delete Team Winn/Loss Score Differential,
    '		2.3.6.5 Delete Team Ranking, 2.3.6.5.1 Delete Team ESPN Poll Ranking,
    '		2.3.6.5.2 Delete Team Records and Percentage Index (RPI)
    'Pre-Condition: There is an existing and active profile manager
    'Post-Condition: A new team profile is created
    'Functionality: Create a new team profile
    Function createTeamProfile( _
        ByVal teamName As String, _
        ByVal schoolName As String, _
        ByVal conference As String, _
        ByVal cheer As String, _
        ByVal notes As String, _
        ByVal wins As Integer, _
        ByVal losses As Integer, _
        ByVal winLossScoreDiff As Double, _
        ByVal espnRanking As Integer, _
        ByVal rpi As Integer, _
        ByVal textColor As String, _
        ByVal profileManagerId As String) As String


        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim teamProfileIdParm As OracleParameter = New OracleParameter("p_team_profile_id", OracleType.VarChar)
        Dim teamNameParm As OracleParameter = New OracleParameter("p_team_name", OracleType.VarChar)
        Dim schoolNameParm As OracleParameter = New OracleParameter("p_school_name", OracleType.VarChar)
        Dim conferenceParm As OracleParameter = New OracleParameter("p_conference", OracleType.VarChar)
        Dim cheerParm As OracleParameter = New OracleParameter("p_cheer", OracleType.VarChar)
        Dim notesParm As OracleParameter = New OracleParameter("p_notes", OracleType.VarChar)
        Dim winsParm As OracleParameter = New OracleParameter("p_wins", OracleType.Number)
        Dim lossesParm As OracleParameter = New OracleParameter("p_losses", OracleType.Number)
        Dim scoreDiffParm As OracleParameter = New OracleParameter("p_win_loss_score_diff", OracleType.Number)
        Dim espnRankingParm As OracleParameter = New OracleParameter("p_espn_ranking", OracleType.Number)
        Dim rpiParm As OracleParameter = New OracleParameter("p_rpi", OracleType.Number)
        Dim textColorParm As OracleParameter = New OracleParameter("p_text_color", OracleType.VarChar)
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Team_Profile_Working_INSUPD"

        'Set up the oracle parameters
        teamProfileIdParm.Direction = ParameterDirection.InputOutput
        teamProfileIdParm.Value = ""
        teamProfileIdParm.Size = 32

        teamNameParm.Direction = ParameterDirection.Input
        teamNameParm.Value = teamName


        schoolNameParm.Direction = ParameterDirection.Input
        schoolNameParm.Value = schoolName

        conferenceParm.Direction = ParameterDirection.Input
        conferenceParm.Value = conference

        cheerParm.Direction = ParameterDirection.Input
        cheerParm.Value = cheer

        notesParm.Direction = ParameterDirection.Input
        notesParm.Value = notes

        winsParm.Direction = ParameterDirection.Input
        winsParm.Value = wins

        lossesParm.Direction = ParameterDirection.Input
        lossesParm.Value = losses

        scoreDiffParm.Direction = ParameterDirection.Input
        scoreDiffParm.Value = winLossScoreDiff

        espnRankingParm.Direction = ParameterDirection.Input
        espnRankingParm.Value = espnRanking

        rpiParm.Direction = ParameterDirection.Input
        rpiParm.Value = rpi

        textColorParm.Direction = ParameterDirection.Input
        textColorParm.Value = textColor

        profileManagerIdParm.Direction = ParameterDirection.Input
        profileManagerIdParm.Value = profileManagerId

        'Add the parameters to the command
        command.Parameters.Add(teamProfileIdParm)
        command.Parameters.Add(teamNameParm)
        command.Parameters.Add(schoolNameParm)
        command.Parameters.Add(conferenceParm)
        command.Parameters.Add(cheerParm)
        command.Parameters.Add(notesParm)
        command.Parameters.Add(winsParm)
        command.Parameters.Add(lossesParm)
        command.Parameters.Add(scoreDiffParm)
        command.Parameters.Add(espnRankingParm)
        command.Parameters.Add(rpiParm)
        command.Parameters.Add(textColorParm)
        command.Parameters.Add(profileManagerIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()

        Return teamProfileIdParm.Value
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 2. Manage Team Profile, 2.2 Edit Team Profile,
    '		2.2.1 Edit Team Name, 2.2.2 Edit Team Notes, 2.2.3 Edit Team Cheer,
    '		2.2.4 Edit Team Conference, 2.2.5 Edit Team Picutre,
    '		2.2.6 Edit Team Statistics, 2.2.6.1 Edit Team Wins,
    '		2.2.6.2 Edit Team Losses, 2.2.6.3 Edit Team Win Percentage,
    '		2.2.6.4 Edit Team Win\Loss Score Differential,
    '		2.2.6.5 Edit Team Ranking, 2.2.6.5.1 Edit Team ESPN Poll Ranking,
    '		2.2.6.5.2 Edit Team Records and Percentage Index (RPI),
    '		2.2.7 Edit School Name
    'Pre-Condition: A team profile exists which to update.
    'Post-Condition: The team profile is updated.
    'Functionality: Update a team profile.
    Sub updateTeamProfile( _
        ByVal teamProfileId As String, _
        ByVal teamName As String, _
        ByVal schoolName As String, _
        ByVal conference As String, _
        ByVal cheer As String, _
        ByVal notes As String, _
        ByVal wins As Integer, _
        ByVal losses As Integer, _
        ByVal winLossScoreDiff As Double, _
        ByVal espnRanking As Integer, _
        ByVal rpi As Integer, _
        ByVal textColor As String, _
        ByVal profileManagerId As String)


        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim teamProfileIdParm As OracleParameter = New OracleParameter("p_team_profile_id", OracleType.VarChar)
        Dim teamNameParm As OracleParameter = New OracleParameter("p_team_name", OracleType.VarChar)
        Dim schoolNameParm As OracleParameter = New OracleParameter("p_school_name", OracleType.VarChar)
        Dim conferenceParm As OracleParameter = New OracleParameter("p_conference", OracleType.VarChar)
        Dim cheerParm As OracleParameter = New OracleParameter("p_cheer", OracleType.VarChar)
        Dim notesParm As OracleParameter = New OracleParameter("p_notes", OracleType.VarChar)
        Dim winsParm As OracleParameter = New OracleParameter("p_wins", OracleType.Number)
        Dim lossesParm As OracleParameter = New OracleParameter("p_losses", OracleType.Number)
        Dim scoreDiffParm As OracleParameter = New OracleParameter("p_win_loss_score_diff", OracleType.Number)
        Dim espnRankingParm As OracleParameter = New OracleParameter("p_espn_ranking", OracleType.Number)
        Dim rpiParm As OracleParameter = New OracleParameter("p_rpi", OracleType.Number)
        Dim textColorParm As OracleParameter = New OracleParameter("p_text_color", OracleType.VarChar)
        Dim profileManagerIdParm As OracleParameter = New OracleParameter("p_profile_manager_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Team_Profile_Working_INSUPD"

        'Set up the oracle parameters
        teamProfileIdParm.Direction = ParameterDirection.InputOutput
        teamProfileIdParm.Value = teamProfileId
        teamProfileIdParm.Size = 32

        teamNameParm.Direction = ParameterDirection.Input
        teamNameParm.Value = teamName


        schoolNameParm.Direction = ParameterDirection.Input
        schoolNameParm.Value = schoolName

        conferenceParm.Direction = ParameterDirection.Input
        conferenceParm.Value = conference

        cheerParm.Direction = ParameterDirection.Input
        cheerParm.Value = cheer

        notesParm.Direction = ParameterDirection.Input
        notesParm.Value = notes

        winsParm.Direction = ParameterDirection.Input
        winsParm.Value = wins

        lossesParm.Direction = ParameterDirection.Input
        lossesParm.Value = losses

        scoreDiffParm.Direction = ParameterDirection.Input
        scoreDiffParm.Value = winLossScoreDiff

        espnRankingParm.Direction = ParameterDirection.Input
        espnRankingParm.Value = espnRanking

        rpiParm.Direction = ParameterDirection.Input
        rpiParm.Value = rpi

        textColorParm.Direction = ParameterDirection.Input
        textColorParm.Value = textColor

        profileManagerIdParm.Direction = ParameterDirection.Input
        profileManagerIdParm.Value = profileManagerId

        'Add the parameters to the command
        command.Parameters.Add(teamProfileIdParm)
        command.Parameters.Add(teamNameParm)
        command.Parameters.Add(schoolNameParm)
        command.Parameters.Add(conferenceParm)
        command.Parameters.Add(cheerParm)
        command.Parameters.Add(notesParm)
        command.Parameters.Add(winsParm)
        command.Parameters.Add(lossesParm)
        command.Parameters.Add(scoreDiffParm)
        command.Parameters.Add(espnRankingParm)
        command.Parameters.Add(rpiParm)
        command.Parameters.Add(textColorParm)
        command.Parameters.Add(profileManagerIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 2. Manage Team Profile, 2.3 Delete Team Profile,
    '		2.3.1 Delete Team Name, 2.3.2 Delete Team Notes,
    '		2.3.3 Delete Team Cheer, 2.3.4 Delete Team Conference,
    '		2.3.5 Delete Team Picture, 2.3.6 Delete Team Statistics,
    '		2.3.6.1 Delete Team Wins, 2.3.6.2 Delete Team Losses,
    '		2.3.6.3 Delete Team Win Percentage,
    '		2.3.6.4 Delete Team Win/Loss Score Differential,
    '		2.3.6.5 Delete Team Ranking, 2.3.6.5.1 Delete Team ESPN Poll Ranking,
    '		2.3.6.5.2 Delete Team Records and Percentage Index (RPI),
    '		2.3.7 Delete School Name, 2.3.8 Delete Date Added to System,
    '		2.3.9 Delete Team Roster
    'Pre-Condition: There is a team profile that exists for which to delete.
    'Post-Condition: The team profile is deleted.
    'Functionality: Delete a team profile.
    Sub deleteTeamProfile(ByVal teamProfileId As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim teamProfileIdParm As OracleParameter = New OracleParameter("p_team_profile_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Team_Profile_DEL"

        'Set up the oracle parameters
        teamProfileIdParm.Direction = ParameterDirection.Input
        teamProfileIdParm.Value = teamProfileId

        'Add the parameters to the command
        command.Parameters.Add(teamProfileIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 2.1.5 Add Team Picture
    'Pre-Condition: The team exists in the database
    'Post-Condition: The photo is added to the team on the database
    'Functionality: Add a team photo
    Sub addTeamPhoto(ByVal teamProfileId As String, ByVal filePath As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim teamProfileIdParm As OracleParameter = New OracleParameter("p_team_profile_id", OracleType.VarChar)
        Dim pictureParm As OracleParameter = New OracleParameter("p_picture", OracleType.Blob)
        Dim myBytes As Byte()

        'Turn the image into a byte array that can be stored into a BLOB
        myBytes = My.Computer.FileSystem.ReadAllBytes(filePath)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Add_Team_Photo"

        'Set up the oracle parameters
        teamProfileIdParm.Direction = ParameterDirection.Input
        teamProfileIdParm.Value = teamProfileId

        pictureParm.Direction = ParameterDirection.Input
        pictureParm.Value = myBytes

        'Add the parameters to the command
        command.Parameters.Add(teamProfileIdParm)
        command.Parameters.Add(pictureParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: There is a team for which to get a photo for.
    'Post-Condition: A photo is returned for this team.
    'Functionality: Get the photo for a given team.
    Function getTeamPhoto(ByVal teamProfileId As String) As Image

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim teamProfileIdParm As OracleParameter = New OracleParameter("p_team_profile_id", OracleType.VarChar)
        Dim pictureParm As OracleParameter = New OracleParameter("r_picture", OracleType.Blob)

        'Variables for reading the image from a BLOB to an image
        Dim MyBytes() As Byte
        Dim myStream As System.IO.MemoryStream
        Dim myPic As Image

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Get_Team_Photo"

        'Set up the oracle parameters
        teamProfileIdParm.Direction = ParameterDirection.Input
        teamProfileIdParm.Value = teamProfileId

        pictureParm.Direction = ParameterDirection.Output

        'Add the parameters to the command
        command.Parameters.Add(teamProfileIdParm)
        command.Parameters.Add(pictureParm)

        'Execute the command
        command.ExecuteNonQuery()

        'If the picture parameter did not return null, then read the BLOB into
        '		an array of bytes.
        If Not pictureParm.Value.Equals(System.DBNull.Value) Then
            ReDim MyBytes(pictureParm.Value.Length)
            pictureParm.Value.Read(MyBytes, 0, pictureParm.Value.Length)

            'Close the connection
            connection.Close()

            'Read the array of bytes into a memory stream
            myStream = New System.IO.MemoryStream(MyBytes)

            'Create the image form the stream
            myPic = Image.FromStream(myStream, True)
            'If the picture is null on the database, use the noImage stored in the
            '		program
        Else
            myPic = My.Resources.noImage
        End If

        'Return the picture
        Return myPic
    End Function

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): N/A
    'Pre-Condition: There is a player and a team in the same profile manager
    '		file to associate.
    'Post-Condition: The player is listed as on the team.
    'Functionality: Add a player to a team's roster.
    Sub addPlayerToTeam(ByVal playerNumber As Integer, ByVal teamProfileId As String, ByVal athleteProfileId As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim playerNumberParm As OracleParameter = New OracleParameter("p_athlete_number", OracleType.Number)
        Dim teamProfileIdParm As OracleParameter = New OracleParameter("p_team_profile_id", OracleType.VarChar)
        Dim athleteProfifleIdParm As OracleParameter = New OracleParameter("p_athlete_profile_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Team_Athlete_Working_INSUPD"

        'Set up the oracle parameters
        playerNumberParm.Direction = ParameterDirection.Input
        playerNumberParm.Value = playerNumber

        teamProfileIdParm.Direction = ParameterDirection.Input
        teamProfileIdParm.Value = teamProfileId

        athleteProfifleIdParm.Direction = ParameterDirection.Input
        athleteProfifleIdParm.Value = athleteProfileId

        'Add the parameters to the command
        command.Parameters.Add(playerNumberParm)
        command.Parameters.Add(teamProfileIdParm)
        command.Parameters.Add(athleteProfifleIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    'Developer Name: Jason Lyle
    'Module Name: Database Control
    'Task(s): 2. Manage Team Profile, 2.5 Manage Team Roster,
    '		2.5.3 Delete Player From Roster
    'Pre-Condition: There is a player on a team roster.
    'Post-Condition: The player is removed from the roster.
    'Functionality: Remove a player from a team.
    Sub removePlayerFromTeam(ByVal athleteProfileId As String)

        'Create an oracle connection
        Dim connection As OracleConnection = openOracleConnection()

        'Create an oracle command
        Dim command As OracleCommand = New OracleCommand()

        'Create the parameters for the stored prcedure
        Dim athleteProfileIdParm As OracleParameter = New OracleParameter("p_athlete_profile_id", OracleType.VarChar)

        'Set up the command
        command.Connection = connection
        command.CommandType = CommandType.StoredProcedure
        command.CommandText = "PM_CRUD.PM_Team_Athlete_DEL"

        'Set up the oracle parameters
        athleteProfileIdParm.Direction = ParameterDirection.Input
        athleteProfileIdParm.Value = athleteProfileId

        'Add the parameters to the command
        command.Parameters.Add(athleteProfileIdParm)

        'Execute the command
        command.ExecuteNonQuery()

        'Close the connection
        connection.Close()
    End Sub

    

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: Athlete text boxes were previously visible, 'Browse Profile' button
    '               has been clicked, or the athlete data grid was selected
    'Post-Condition: All athlete text boxes are now invisible from the user
    'Functionality: Hides all athlete text boxes on the form

    Private Sub athleteTab_hideTextBoxes()
        athleteTab_searchTeamNameTextBox.Visible = False
        athleteTab_searchLastNameTextBox.Visible = False
        athleteTab_searchFirstNameTextBox.Visible = False
        athleteTab_searchNicknameTextBox.Visible = False
        athleteTab_searchClassRankTextBox.Visible = False
        athleteTab_apgTextBox.Visible = False
        athleteTab_firstNameTextBox.Visible = False
        athleteTab_lastNameTextBox.Visible = False
        athleteTab_ppgTextBox.Visible = False
        athleteTab_rpgTextBox.Visible = False
        athleteTab_teamTextBox.Visible = False
        editImageButton.Visible = False
        athleteTab_saveProfileButton.Visible = False
        athleteTab_nickNameTextBox.Visible = False
        athleteTab_classRankTextBox.Visible = False
        athleteTab_numberTextBox.Visible = False
        athleteTab_mpgTextBox.Visible = False
        athleteTab_spgTextBox.Visible = False
        athleteTab_ftpTextBox.Visible = False
        athleteTab_middleInitialTextBox.Visible = False
        athleteTab_notesTextBox.Visible = False
        athleteTab_AddToCompareBtn.Visible = True
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: Athlete text boxes were previously invisible, 'Edit Profile' or
    '               'Add Profile' button has been clicked. 
    'Post-Condition: All athlete text boxes are now visible from the user
    'Functionality: Unhides all athlete text boxes on the form
    Private Sub athleteTab_UnhideTextBoxes()
        athleteTab_apgTextBox.Visible = True
        athleteTab_firstNameTextBox.Visible = True
        athleteTab_lastNameTextBox.Visible = True
        athleteTab_ppgTextBox.Visible = True
        athleteTab_rpgTextBox.Visible = True
        athleteTab_teamTextBox.Visible = True
        athleteTab_nickNameTextBox.Visible = True
        athleteTab_mpgTextBox.Visible = True
        athleteTab_ftpTextBox.Visible = True
        athleteTab_classRankTextBox.Visible = True
        athleteTab_numberTextBox.Visible = True
        athleteTab_spgTextBox.Visible = True
        athleteTab_middleInitialTextBox.Visible = True
        athleteTab_notesTextBox.Visible = True
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: Athlete search text boxes were previously visible, 'Edit' or 'Add' profile
    '               buttons have been clicked
    'Post-Condition: All athlete search text boxes are now invisible from the user
    'Functionality: Hides all athlete search text boxes on the form
    Private Sub athleteTab_hideSearchTextBoxes()
        athleteTab_searchLastNameTextBox.Visible = False
        athleteTab_searchTeamNameTextBox.Visible = False
        athleteTab_searchDateAddedRadio.Visible = False
        athleteTab_searchTeamRadio.Visible = False
        athleteTab_searchFirstNameRadio.Visible = False
        athleteTab_searchFirstNameTextBox.Visible = False
        athleteTab_searchLastNameRadio.Visible = False
        athleteTab_searchNicknameRadio.Visible = False
        athleteTab_searchNicknameTextBox.Visible = False
        athleteTab_searchClassRankRadio.Visible = False
        athleteTab_searchClassRankTextBox.Visible = False
    End Sub

    

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: Athlete text boxes are visible, 'Edit' or 'Add' profile
    '               buttons have been clicked.
    'Post-Condition: Color of the text in each athlete text box is now of the same
    '                color.
    'Functionality: Changes the text color in each text box in athlete profile tab
    Private Sub changeAthleteTextColorTextBox(ByVal newColor As Color)
        athleteTab_firstNameTextBox.textColor = newColor
        athleteTab_lastNameTextBox.textColor = newColor
        athleteTab_nickNameTextBox.textColor = newColor
        athleteTab_classRankTextBox.ForeColor = newColor
        athleteTab_teamTextBox.textColor = newColor
        athleteTab_numberTextBox.textColor = newColor
        athleteTab_ppgTextBox.textColor = newColor
        athleteTab_apgTextBox.textColor = newColor
        athleteTab_rpgTextBox.textColor = newColor
        athleteTab_mpgTextBox.textColor = newColor
        athleteTab_spgTextBox.textColor = newColor
        athleteTab_ftpTextBox.textColor = newColor
        athleteTab_notesTextBox.textColor = newColor
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: Athlete text labels are visible.
    'Post-Condition: Color of the text in each athlete text label is now of the same
    '                color.
    'Functionality: Changes the text color in each text label in athlete profile tab
    Private Sub changeAthleteTextLabelColor(ByVal newColor As Color)
        athleteTab_firstNameLabel.ForeColor = newColor
        athleteTab_lastNameLabel.ForeColor = newColor
        athleteTab_nickNameLabel.ForeColor = newColor
        athleteTab_classRankLabel.ForeColor = newColor
        athleteTab_teamNameLabel.ForeColor = newColor
        athleteTab_numberLabel.ForeColor = newColor
        athleteTab_ppgLabel.ForeColor = newColor
        athleteTab_apgLabel.ForeColor = newColor
        athleteTab_rpgLabel.ForeColor = newColor
        athleteTab_mpgLabel.ForeColor = newColor
        athleteTab_spgLabel.ForeColor = newColor
        athleteTab_ftpLabel.ForeColor = newColor
        athleteTab_notesLabel.ForeColor = newColor
    End Sub

    'Developer Name: Stephen Durfey
    'Module Name: Athlete Profile Management
    'Task(s): N/A
    'Pre-Condition: An Athlete has been selected from the datagrid
    'Post-Condition: All athlete text labels have been populated with the appropriate values from 
    '                the athlete data grid
    'Functionality: called from various other functions to populate the athlete text labels with
    '               the appropriate values from the athlete data grid
    Private Sub populateAthleteTextLabels()
        Dim indexSelected As Integer = athleteAthleteGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

        athleteTab_firstNameLabel.Text = athleteAthleteGrid.Item(athleteFirstNameCol.Index, indexSelected).Value
        athleteTab_lastNameLabel.Text = athleteAthleteGrid.Item(athleteLastNameCol.Index, indexSelected).Value
        athleteTab_nickNameLabel.Text = athleteAthleteGrid.Item(athleteNicknameCol.Index, indexSelected).Value
        athleteTab_classRankLabel.Text = athleteAthleteGrid.Item(athleteClassRankCol.Index, indexSelected).Value
        athleteTab_teamNameLabel.Text = athleteAthleteGrid.Item(athleteTeamNameCol.Index, indexSelected).Value
        athleteTab_numberLabel.Text = athleteAthleteGrid.Item(athleteAthleteNumberCol.Index, indexSelected).Value
        athleteTab_ppgLabel.Text = athleteAthleteGrid.Item(athletePtsPerGameCol.Index, indexSelected).Value
        athleteTab_apgLabel.Text = athleteAthleteGrid.Item(athleteAssistsPerGameCol.Index, indexSelected).Value
        athleteTab_rpgLabel.Text = athleteAthleteGrid.Item(athleteReboundsPerGameCol.Index, indexSelected).Value
        athleteTab_mpgLabel.Text = athleteAthleteGrid.Item(athleteMinutesPerGameCol.Index, indexSelected).Value
        athleteTab_spgLabel.Text = athleteAthleteGrid.Item(athleteStealsPerGameCol.Index, indexSelected).Value
        athleteTab_ftpLabel.Text = athleteAthleteGrid.Item(athleteFreethrowPercentageCol.Index, indexSelected).Value
        athleteTab_athletePic.Image = athleteAthleteGrid.Item(athletePictureCol.Index, indexSelected).Value
        athleteTab_notesLabel.Text = athleteAthleteGrid.Item(athleteNotesCol.Index, indexSelected).Value
        changeAthleteTextColorTextBox((athleteAthleteGrid.Item(athleteTextColorCol.Index, indexSelected).Value))
    End Sub

    
    

    'Developer Name: Stephen Durfey
    'Module: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: Team text boxes were previously invisible, 'Edit Profile' or
    '               'Add Profile' button has been clicked. 
    'Post-Condition: All team text boxes are now visible from the user
    'Functionality: Unhides all team text boxes on the form
    Private Sub teamTab_unhideTextBoxes()
        teamTab_conferenceTextBox.Visible = True
        teamTab_ESPNRankingTextBox.Visible = True
        teamTab_lossesTextBox.Visible = True
        teamTab_RPITextBox.Visible = True
        teamTab_schoolNameTextBox.Visible = True
        teamTab_teamNameTextBox.Visible = True
        teamTab_winsTextBox.Visible = True
        teamTab_notesTextBox.Visible = True
        teamTab_editImageButton.Visible = True
        teamTab_winLossDiffTextBox.Visible = True
        teamTab_cheerTextBox.Visible = True
        teamAddToCompareBtn.Visible = False
        teamTab_saveProfileButton.Visible = True
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: Team text boxes were previously visible, 'Browse Profile' button
    '               has been clicked, or the athlete data grid was selected
    'Post-Condition: All team text boxes are now invisible from the user
    'Functionality: Hides all team text boxes on the form
    Private Sub teamTab_hideTextBoxes()
        teamTab_conferenceTextBox.Visible = False
        teamTab_cheerTextBox.Visible = False
        teamTab_ESPNRankingTextBox.Visible = False
        teamTab_lossesTextBox.Visible = False
        teamTab_RPITextBox.Visible = False
        teamTab_schoolNameTextBox.Visible = False
        teamTab_teamNameTextBox.Visible = False
        teamTab_winsTextBox.Visible = False
        teamTab_notesTextBox.Visible = False
        teamTab_editImageButton.Visible = False
        teamTab_searchConferenceTextBox.Visible = False
        teamTab_searchSchoolTextBox.Visible = False
        teamTab_searchTeamTextBox.Visible = False
        teamTab_winLossDiffTextBox.Visible = False
        teamTab_saveProfileButton.Visible = False
        teamAddToCompareBtn.Visible = True
    End Sub

  

    'Developer Name: Stephen Durfey
    'Module: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: Team text boxes were previously visible, 'Browse Profile', 
    '                   'Add Profile', or 'Edit Profile' buttons
    '               have been clicked, or the team data grid was selected
    'Post-Condition: All team text boxes are now invisible from the user
    'Functionality: Hides all team text boxes on the form
    Private Sub teamTab_hideSearchBoxes()
        teamTab_searchConferenceTextBox.Visible = False
        teamTab_searchConferenceRadio.Visible = False
        teamTab_searchDateAddedRadio.Visible = False
        teamTab_searchSchoolRadio.Visible = False
        teamTab_searchSchoolTextBox.Visible = False
        teamTab_searchTeamTextBox.Visible = False
        teamTab_searchTeamRadio.Visible = False
        teamTab_editImageButton.Visible = False
    End Sub


    'Developer Name: Stephen Durfey
    'Module: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: Team text boxes are visible, 'Edit' or 'Add' profile
    '               buttons have been clicked.
    'Post-Condition: Color of the text in each team text box is now of the same
    '                color.
    'Functionality: Changes the text color in each text box in team profile tab
    Private Sub changeTeamTextColorTextBox(ByRef newColor As Color)
        teamTab_conferenceTextBox.textColor = newColor
        teamTab_schoolNameTextBox.textColor = newColor
        teamTab_teamNameTextBox.textColor = newColor
        teamTab_winsTextBox.textColor = newColor
        teamTab_lossesTextBox.textColor = newColor
        teamTab_ESPNRankingTextBox.textColor = newColor
        teamTab_RPITextBox.textColor = newColor
        teamTab_notesTextBox.textColor = newColor
        teamTab_winLossDiffTextBox.textColor = newColor
        teamTab_cheerTextBox.textColor = newColor
    End Sub

    'Developer Name: Stephen Durfey
    'Module: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: Team text labels are visible, 'Browse Profile'
    '               button have been clicked.
    'Post-Condition: Color of the text in each team text label is now of the same
    '                color.
    'Functionality: Changes the text color in each text label in team profile tab
    Private Sub changeTeamTextColorTextLabels(ByRef newColor As Color)
        teamTab_conference.ForeColor = newColor
        teamTab_schoolName.ForeColor = newColor
        teamTab_teamName.ForeColor = newColor
        teamTab_wins.ForeColor = newColor
        teamTab_losses.ForeColor = newColor
        teamTab_ESPNRanking.ForeColor = newColor
        teamTab_RPI.ForeColor = newColor
        teamTab_notesLabel.ForeColor = newColor
        teamTab_winLossDiff.ForeColor = newColor
        teamTab_cheerLabel.ForeColor = newColor

    End Sub


    'Developer Name: Stephen Durfey
    'Module Name: Team Profile Management
    'Task(s): N/A
    'Pre-Condition: A team has been selected from the team datagrid
    'Post-Condition: All team text labels have been populated with the appropriate values from 
    '                the team data grid
    'Functionality: called from various other functions to populate the team text labels with
    '               the appropriate values from the team data grid
    Private Sub populateTeamTextLabels()
        Dim indexSelected As Integer = teamTeamGrid.Rows.GetFirstRow(DataGridViewElementStates.Selected)

        teamTab_teamName.Text = teamTeamGrid.Item(teamTeamNameCol.Index, indexSelected).Value
        teamTab_schoolName.Text = teamTeamGrid.Item(teamSchoolNameCol.Index, indexSelected).Value
        teamTab_conference.Text = teamTeamGrid.Item(teamConferenceCol.Index, indexSelected).Value
        teamTab_wins.Text = teamTeamGrid.Item(teamWinsCol.Index, indexSelected).Value
        teamTab_losses.Text = teamTeamGrid.Item(teamLossesCol.Index, indexSelected).Value
        teamTab_ESPNRanking.Text = teamTeamGrid.Item(teamESPNRankingCol.Index, indexSelected).Value
        teamTab_RPI.Text = teamTeamGrid.Item(teamRPICol.Index, indexSelected).Value
        teamTab_notesLabel.Text = teamTeamGrid.Item(teamNotesCol.Index, indexSelected).Value
        teamTab_winLossDiff.Text = teamTeamGrid.Item(teamWinLossScoreDiffCol.Index, indexSelected).Value
        teamTab_cheerLabel.Text = teamTeamGrid.Item(teamCheerCol.Index, indexSelected).Value
        teamTab_pictureBox.Image = teamTeamGrid.Item(teamPictureCol.Index, indexSelected).Value

        changeTeamTextColorTextLabels(teamTeamGrid.Item(teamTextColorCol.Index, indexSelected).Value)
    End Sub
End Class